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

Split ci.yml into separate actions #280

Merged
merged 48 commits into from
Oct 18, 2024
Merged

Conversation

TimothyWillard
Copy link
Contributor

Split the "unit-tests" action into multiple actions, currently one for each package contained within the flepiMoP repo. Also updated checkout from v3 to v4 to address node16 deprecation warnings and swapped ubuntu 20.04 for ubuntu latest. Changed the gempyor CI to not print stdout and exit on first failure.

See GH-278.

Split the "unit-tests" action into multiple actions, currently one for
each package contained within the `flepiMoP` repo. Also updated checkout
from v3 to v4 to address node16 deprecation warnings and swapped ubuntu
20.04 for ubuntu latest. Changed the gempyor ci to not print stdout and
exit on first failure.
@TimothyWillard
Copy link
Contributor Author

That did not do quite what I expected. Let me make a few small edits before this is ready for review.

Typo in `setwd` call causes error about not being able to change to
directory that doesn't exist.
Set the shell to bash so the `source` function is available.
Add the same path related limits from the on push to on pull_requests as
well.
@TimothyWillard
Copy link
Contributor Author

These changes are now ready for review.

Copy link
Contributor

@pearsonca pearsonca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems conceptually fine, but I'm not expert enough on GH actions syntax.

Copy link
Member

@shauntruelove shauntruelove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these look good. one minor thing to fix is to remove breaking-improvements branch as i believe that is gone. Are there other branches that should be included?

.github/workflows/flepicommon-ci.yml Outdated Show resolved Hide resolved
.github/workflows/gempyor-ci.yml Outdated Show resolved Hide resolved
Removed the `breaking-improvements` branch from special consideration in
GitHub actions.
@TimothyWillard
Copy link
Contributor Author

Ah, I did not realize that we had sunsetted the breaking-improvements branch, but that makes sense. I kept the dev branch, but I also don't see that as a branch on GitHub so should I remove that as well?

@jcblemai
Copy link
Collaborator

Look good to me, thanks. As mentionned, perhaps the verbosity and all tests with failure were useful as I know from the commit log we have folks using ci as way to test code. But I agree it's better to not have them in Github action, and we can add it back.

the splitting is very welcome.

jcblemai
jcblemai previously approved these changes Oct 2, 2024
Minor edits to run the gempyor tests with python 3.10 and 3.11. Remove
usage of custom docker container.
Very minor edit to `__init__.py` to trigger the `gempyor` CI GitHub
action.
Need to install `test` extra installs to get pytest instead of `dev`.
@TimothyWillard
Copy link
Contributor Author

TimothyWillard commented Oct 18, 2024

This PR is ready for review again. This PR now:

  1. Splits the CI action into separate actions for gempyor, flepicommon and inference. Notably, this excludes flepiconfig which is also not included in the current CI action and does not have a passing test suite (see [Bug]: flepiconfig Test Suite Currently Does Not Pass #350).
  2. This runs the GitHub actions against explicit R and python versions, which clarifies the environments that we support. For now R 4.3.3 and Python 3.10 and 3.11.
  3. Uses caching to speed up the R package environment setup. These caches are reset weekly, but this can be adjusted if this is painful on a Monday. It doesn't do the same for python since that is quick to do, but could also be done in the future if we see slow downs in setup speed.

Some open questions:

  1. I kept the dev branch, but I also don't see that as a branch on GitHub so should I remove that as well?
  2. I suspect there will be some repo settings changes required to accommodate this (see how it is expecting an action called "unit-tests" to run below). Who should I work with to accomplish this?

Steps after this PR:

  1. Investigate switching the environment setup to use conda instead of doing it manually after Generic HPC Install Script #329.
  2. Incorporate flepiconfig into this set of GitHub actions.
  3. Ensure that the workflow chaining works as expected, see: Split ci.yml into separate actions #280 (comment).

pearsonca
pearsonca previously approved these changes Oct 18, 2024
Copy link
Contributor

@pearsonca pearsonca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; one weird space diff, but that's likely test cruft?

@@ -28,6 +28,7 @@ cum_death_forecast <- function (sim_data,

}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; one weird space diff, but that's likely test cruft?

Yeah, exactly. Just wanted to demonstrate what it would look like, but not needed and reverted.

jcblemai
jcblemai previously approved these changes Oct 18, 2024
Remove the changes used to trigger the workflows as an example. Not
needed for the PR.
@TimothyWillard TimothyWillard dismissed stale reviews from jcblemai and pearsonca via cd81c5e October 18, 2024 15:14
@TimothyWillard
Copy link
Contributor Author

Removed the whitespace changes, but I it would be helpful to get answers to the above open questions before merging.

jcblemai
jcblemai previously approved these changes Oct 18, 2024
@jcblemai jcblemai requested a review from pearsonca October 18, 2024 15:28
Copy link
Contributor

@pearsonca pearsonca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still approve, but also still some weird whitespace diffs?

@jcblemai
Copy link
Collaborator

Still approve, but also still some weird whitespace diffs?

where @pearsonca ?

@TimothyWillard TimothyWillard merged commit 5f61657 into main Oct 18, 2024
@TimothyWillard
Copy link
Contributor Author

Still approve, but also still some weird whitespace diffs?

I'm also a bit confused about this one:

twillard@epid-iss-MacBook-Pro ~/D/G/H/flepiMoP (split-up-unit-tests-action)> git diff --name-only HEAD ( git merge-base main HEAD )
.github/workflows/ci.yml
.github/workflows/flepicommon-ci.yml
.github/workflows/gempyor-ci.yml
.github/workflows/inference-ci.yml

@TimothyWillard TimothyWillard deleted the split-up-unit-tests-action branch October 18, 2024 15:56
TimothyWillard added a commit that referenced this pull request Oct 18, 2024
Changed the default python version to 3.11 from 3.11 after now having
merged GH-280.
@TimothyWillard TimothyWillard linked an issue Oct 18, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority High priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc. quick issue Short or easy fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split Up "unit-tests" GitHub Action Into Multiple Actions
4 participants