-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add additional args to yaml files #147
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 94.01% 95.19% +1.18%
==========================================
Files 3 4 +1
Lines 167 208 +41
==========================================
+ Hits 157 198 +41
Misses 10 10 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@e-perl-NOAA, could you review this pull request? I will do a final cleanup after the review before merging the changes into the main branch. Also, could you test the new feature using SS3 repos? For example:
uses: nmfs-fish-tools/ghactions4r/.github/workflows/r-cmd-check.yml@add-additional-args-to-yaml
# uses: nmfs-fish-tools/ghactions4r/.github/workflows/r-cmd-check.yml@main
with:
additional_args_ubuntu: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install --only-upgrade libstdc++6
use_update_pkgdown(
workflow_name = "call-update-pkgdown.yml",
additional_args = list(
"ubuntu" = c(
"sudo apt-get update",
"sudo apt-get install -y libcurl4-openssl-dev",
"sudo add-apt-repository ppa:ubuntu-toolchain-r/test",
"sudo apt-get install --only-upgrade libstdc++6"
)
)
) Let me know if you have any questions! |
Okay, I just added things in the r4ss repo which calls these workflows. It will take awhile for the tests to run and confirm that they work but I will let you know when they do. The r function to update the workflow does work (at least for the ubuntu additions) though of course I did have to change the branch once added from main to this one so that it will work when the github actions are running right now. |
Ummm, so I keep getting this result which is weird because I'm pretty sure everything is right. Idk if this is just one of those situations (like many other things these days) where everything has decided to stop working properly or something else |
@e-perl-NOAA, my bad! I gave the wrong branch name. The correct one is uses: nmfs-fish-tools/ghactions4r/.github/workflows/r-cmd-check.yml@add-additional-args-to-yaml
# uses: nmfs-fish-tools/ghactions4r/.github/workflows/r-cmd-check.yml@main |
Okay it's working in r4ss (there is a problem with the macos run but that's a me problem with gh and APIs and github enterprise with single sign on, not a you problem)! |
@Bai-Li-NOAA would it be too much trouble to add an input for env portion to the r-cmd-check for me to test out? I might not be able to get it to do what I want it to and thus it may not matter in the end. This could also be done in another branch not associated with this PR. |
The env is to try to deal with API calls to the mac github actions runner. |
@e-perl-NOAA Feel free to add an input of env to test in this branch or another branch, either works for me. I am not entirely sure about the desired input format for env portion, but let me know the details of the user case if you would like me to work on it. |
Actually nevermind on the env, it already uses it. It looks like macs will just always cause strife in my life. |
I assume that you will re-run with spell check before you merge. |
I tried adding it and then realized that you already had the GITHUB_TOKEN in there which is what I wanted to try. Its nothing for you to worry about. |
@e-perl-NOAA, okay, thanks for the update! I will do a final cleanup, including fixing the spell check GHA, before merging the PR. |
2440da6
to
0d34ba8
Compare
- update the following YAML files to support additional arguments on Windows, macOS, and Ubuntu: .github/workflows/build-pkgdown.yml, .github/workflows/r-cmd-check.yml, and .github/workflows/update-pkgdown.yml - allow additional arguments to be specified after checking out the repo and before setting up R - add a helper function validate_additional_args() to validate additional arguments for R functions - add a helper function add_args() to include platform-specific additional arguments in a YAML file - add additional_args to use_r_cmd_check(), use_update_pkgdown(), and use_build_pkgdown() to pass additional arguments to YAML files (e.g., call_*.yml) - add unit and integration tests to verify the new feature - update the WORDLIST to pass the spell check - import the cli package and use its functions to signal errors with a cli formatted message
0d34ba8
to
29b7717
Compare
@e-perl-NOAA I have merged the PR. You might need to update some GHA workflows in the SS3 repositories. Let me know if you have any questions! |
This PR addresses issue #144
.github/workflows/build-pkgdown.yml
,.github/workflows/r-cmd-check.yml
, and.github/workflows/update-pkgdown.yml
validate_additional_args()
to validate additional arguments for R functionsadd_args()
to include platform-specific additional arguments in a YAML fileadditional_args
touse_r_cmd_check()
,use_update_pkgdown()
, anduse_build_pkgdown()
to pass additional arguments to YAML files (e.g.,call_*.yml
)