-
Notifications
You must be signed in to change notification settings - Fork 70
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
CI: Run tests on GHA, using Anaconda #138
Conversation
|
||
- pip: | ||
- herbie-data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used the environment-test.yml
file to setup the Conda environment, because it was already close to what was needed there. I see that you might have been using it differently, because it installed the herbie-data
package from PyPI. However, on CI, when running code from a pull request, the code from the repository should be used.
Let me know if you can adjust your workflow, or if you have other suggestions.
env: | ||
TMPDIR: ${{ runner.temp }} | ||
run: | | ||
pytest -vvv -k test_ecmwf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just running a single test here for the sake of saving resources while iterating on the baseline setup, and to see the full test matrix succeed faster. It think it can be adjusted within a subsequent iteration, after seeing the test suite succeed on your end.
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
# In order to save resources, only run particular | ||
# matrix slots on other OS than Linux. | ||
include: | ||
- os: "macos-latest" | ||
python-version: "3.11" | ||
- os: "windows-latest" | ||
python-version: "3.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you want to see any adjustments to the test matrix configuration.
I've not added Python 3.8 here, in order to save resources, and, in a similar spirit, the recipe will only run a single version of Python on non-Linux operating systems. I see that you designated Python 3.10 to be the "default" version supported by Herbie, but I think it is safe to bump that to Python 3.11.
On regular operations, you would toggle to fail-fast: true
, in order to save further resources: It will cancel other jobs when a test job fails on one test matrix slot, because it does not make sense to continue running them.
Using fail-fast: false
makes sense when working on the workflow recipe itself, in order to get the big picture if specific tests would only fail on Windows, for example, and you don't want them to cancel the jobs running on Linux.
Closing this in favor of GH-139. It will use less resources, and still provide reasonable coverage of platform/environments. |
Dear Brian,
this is a first stab at GH-100, using Anaconda for setting up the sandbox environment. See also [1] for an example run.
With kind regards,
Andreas.
[1] https://github.com/earthobservations/Herbie/actions/runs/3861815012/usage