Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action Repair #144

Merged
merged 77 commits into from
Apr 16, 2024
Merged

GitHub Action Repair #144

merged 77 commits into from
Apr 16, 2024

Conversation

njlyon0
Copy link
Member

@njlyon0 njlyon0 commented Mar 21, 2024

First pass at getting GitHub actions (R-CMD check and pkgdown site build) to work again. I'd like to merge this PR to see if the changes I've implemented fix things at least on a sort of macro level. I can get the pkgdown site to render locally and my devtools check returns 1 NOTE (orphaned package) with no ERROR/WARNINGs and a bunch of issues with the testthat tests--that I'm not sure would cause a functioning R-CMD check GitHub action to fail.

This is directly related to issue #140 and #143 with possible relevance to other issues.

@njlyon0
Copy link
Member Author

njlyon0 commented Mar 21, 2024

Got both GitHub actions (R check + pkgdown build) to work on any update to a PR so I should be able to use this PR as a testing ground as I experiment with the GitHub actions (without needing to merge it just to test). Sorry if this makes a bunch of email pings for you Julien!

@njlyon0
Copy link
Member Author

njlyon0 commented Apr 10, 2024

Progress Report

I've gotten the R-CMD check to run locally and return 0 errors/warnings/notes (on my computer--Mac OS--at least). The pkdown site also builds correctly for me when running pkgdown::build_site(). I've re-worked both GitHub actions to exactly mirror the GHAs YAMLs of one of my personal R packages where both GHAs work.

In the "details" of the failed GHAs here it seems like they all fail at the following step: Run r-lib/actions/setup-r-dependencies@v2 and the details of that step you get something like "Cache not found for input keys: ...". I don't know enough about how GitHub does cache actions but this is starting to feel like a bug beyond the actual structure / contents of metajam.

@brunj7, do you have any insight on a solution and/or better problem identification here?

For what it's worth, I'd pitch merging this PR regardless of the GitHub action issues because the package itself is in better shape in this branch than it is in the 'main' branch currently

@njlyon0
Copy link
Member Author

njlyon0 commented Apr 11, 2024

Huge Progress!

While searching for other instances of this issue I found this Posit Community post which seems very closely related to what we're experiencing here. In that post, they link this issue which suggests the following changes to the GitHub Action YAMLs:

  1. In the env var, set the PKH_SYSREQS to false
  2. Add the following code chunk to the steps var:
- name: dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y make libicu-dev libxml2-dev libssl-dev pandoc librdf0-dev libnode-dev libcurl4-gnutls-dev

Implementing both of these has fixed the pkgdown website build GHA as well as the ubuntu release & "oldrel-1" checks! However, the ubuntu devel and windows checks are still failing. So 4/6 success at this point which feels like progress

Note Going Forward

I will not be editing the pkgdown site YAML any more because it works and I don't want to disrupt the special magicks causing it to suddenly work. Effort can be focused on the R-CMD check YAML now

…nce in GHA details) and adding `libjq-dev` to set of packages
… `libcurl4-gnutls-dev` and broken previously-functioning GHAs
@njlyon0
Copy link
Member Author

njlyon0 commented Apr 11, 2024

Progress!

Adding the libjq-dev installation fixed the issues on the remaining version of ubuntu (dev)! Only the Windows check still fails and it looks like actual real errors in the testthat scripts that I can address and use pushes to this PR to see when they resolve.

@njlyon0
Copy link
Member Author

njlyon0 commented Apr 11, 2024

GitHub Actions Fixed!

That last tweak fixed the R-CMD check for Windows OS and that means that all 6 GitHub Actions now succeed! We are ready to merge this PR whenever it is convenient. To help with other documentation I'm listing below all open metajam issues that are resolved by this PR merge.

Related Issues

Solved:

Maybe Solved:

  • fix what roxygen broke 🙄 #141 - Not sure if this is fixed but if it is supposed to throw an error/warning on R-CMD check it isn't
  • Improve file path management when data already downloaded #137 - Ran into a ton of problems with function failures when data already existed so I just amended data download functions to add a "_copy#" to the end of the folder name and re-download there. Because file paths are very rarely actually specified (most are just passed as objects among functions) we avoid any actual error and users who re-run download functions can be satisfied that they have successfully download (a copy of) their desired data

@njlyon0 njlyon0 mentioned this pull request Apr 16, 2024
@njlyon0 njlyon0 merged commit e9d673e into main Apr 16, 2024
6 checks passed
@njlyon0 njlyon0 deleted the gha-repair branch April 16, 2024 16:24
@njlyon0 njlyon0 mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant