-
Notifications
You must be signed in to change notification settings - Fork 3
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
[feature:] setup github actions to build main branch and dev branch case studies #51
Comments
@kellijohnson-NOAA , to make it so you can get a notification for the cron run, could you make a push to main that edits this line?
For example, I think you could simply change the time at which it runs, e.g., At 01:30 on Sunday. Times are in UTC, I believe. |
@Bai-Li-NOAA I think you may be able to help here - I'm trying to figure out how to " update the FIMS pkg to the latest dev branch version and rerun the dev branch of the case-studies repository run on a regular basis, maybe even every push to dev". It looks like the version of FIMS download is defined here: case-studies/content/setup.qmd Line 15 in 90d11a2
By default, it will be installing the main branch. Can you think of a way to keep installation of FIMS in this file, but install the main version of FIMS if the GHA is running on main, and install the dev version of FIMS if the GHA is running on a branch called dev? One hacky solution would be to have the GHA on dev edit this file before it runs, it seems like there should be a more transparent way. Other thoughts are I'm not sure what the default should be for feature branches, or if the case studies qmd is running on someone's local computer. @kellijohnson-NOAA I think this question is for you: Is the goal of the |
@k-doering-NOAA, I was thinking we could modify line 15 in the on_main_branch <- system("git branch --show-current") == "main"
if (on_main_branch){
remotes::install_github("NOAA-FIMS/FIMS")
} else {
remotes::install_github("NOAA-FIMS/FIMS", ref = "dev")
}
Not sure if this will work on all OSs or if the git command is usable in R setup on GitHub Actions. If that’s an issue, we could adjust the "Install packages" step in |
@k-doering-NOAA regarding "Is the goal of the dev branch for case studies is just a place for the dev version of FIMS to be installed, or will case study developments happen in dev before they are pushed to main?" My response is I would like main to be static in between releases and have the case-studies repository operate a bit more like the FIMS repository where changes happen in branches off of dev and the pull requests go to dev. Then when there is a FIMS release, the case studies dev branch is ready to be merged into main at the same time. |
Pushing to make sure that I get notifications from this GitHub action. Part of #51
@Bai-Li-NOAA , thank you for the solution! That sounds like it could work well :) @kellijohnson-NOAA , thanks for clarifying the intentions! An alternative/addition would be to use renv to control versions of all packages - although I'm not sure if that would play well with the main/dev setups (for example, it would seem we would always be making commits that change dev to main when we want to update main with the latest release, and that seems a bit tedious). However, it could help with other things, e.g., making sure the main branch case studies continue to work! |
Co-authored-by Bai-Li-NOAA <[email protected]>
Co-authored-by Bai-Li-NOAA <[email protected]>
Download main branch of Fims if using main in the feature branch name Co-authored-by: Bai Li - NOAA <[email protected]> Co-authored-by: Andrea-Havron-NOAA <[email protected]> Co-authored-by: alexjensen-NOAA <[email protected]>
For code club today, we worked on code that would allow a main branch to use the main version of FIMS, any branch that includes the word "main" in its name to use the main version of FIMS, and any other branch would use the dev version of FIMS. We worked in the branch called "gha". We weren't sure how often dev should be updated practically, so we might always expect it to be broken fairly often, but the main branch to work Future steps to take:
|
I rebased cleanup and made a PR to main. The scamp branch/PR by @Andrea-Havron-NOAA is the only other one that needs to be merged into main and then you can create a dev branch, and rebase gha to dev and do a PR of gha to dev. All other remaining branches can just rebase to dev once it is up and running. |
@kellijohnson-NOAA sounds good! Let me know when the time is right for creating the dev branch. |
@k-doering-NOAA all PR have been merged in and you are free to create a dev branch off of main or rebase your branch to main and rename it as dev. |
Co-authored-by Bai-Li-NOAA <[email protected]>
Download main branch of Fims if using main in the feature branch name Co-authored-by: Bai Li - NOAA <[email protected]> Co-authored-by: Andrea-Havron-NOAA <[email protected]> Co-authored-by: alexjensen-NOAA <[email protected]>
Co-authored-by Bai-Li-NOAA <[email protected]>
Download main branch of Fims if using main in the feature branch name Co-authored-by: Bai Li - NOAA <[email protected]> Co-authored-by: Andrea-Havron-NOAA <[email protected]> Co-authored-by: alexjensen-NOAA <[email protected]>
Describe the situation that led to the request and a solution
initiating GitHub actions to:
Alternative solutions
use the send email action to send Kelli notifications instead.
Statistical validity
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: