-
Notifications
You must be signed in to change notification settings - Fork 16
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: Add script for running tests from github worklow #272
Conversation
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.
Looks good 👍
For posterity there was some offline discussion about this
ci/testrmsenv.sh
Outdated
run_pytest () { | ||
echo "Running fmu-tools tests with pytest..." | ||
pushd $CI_TEST_ROOT | ||
pytest -n 4 -vv -m "not skipunlessroxar" |
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.
My brain can't boolean today, but I think we want to include the the roxar tests (does this do that)?
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.
The intention here was to exclude it, to avoid calling the RMS API to often as discussed here https://github.com/equinor/rms-sys/pull/254
But open to include it if we want that.
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.
Saw your comment here equinor/xtgeo#1297
Will include the roxar tests 👍
ci/testrmsenv.sh
Outdated
echo "Installing test dependencies..." | ||
pip install --upgrade --force-reinstall ".[tests]" |
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.
Future selves shall thank us for an isolated install 👍
66e6924
to
fd674d2
Compare
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.
Nice work 👍
* CI: Add script for running tests from github worklow (#271) * CI: Install dependencies for `tests` * CI: Clone xtgeo testdata for tests * CI: Include roxar tests * CI: Use xtgeo-testdata from cache * TST: Use testdata path from test config
* CI: Add script for running tests from github worklow (#272) * CI: Add script for running tests from github worklow (#271) * CI: Install dependencies for `tests` * CI: Clone xtgeo testdata for tests * CI: Include roxar tests * CI: Use xtgeo-testdata from cache * TST: Use testdata path from test config * TST: Tweak depth convert numerical stability One test case was commented out and this solution may not be robust on all machines. --------- Co-authored-by: mferrera <[email protected]>
Resolves part of https://github.com/equinor/rms-sys/issues/267
Added a bash script that can be run from the github workflows to execute the
fmu-tools
unit tests towards an RMS Python Environment. The script copies the required test files, installs the test dependencies and runs the pytests. Note that the xtgeo-testdata files needed to run the tests are cached on the github actions runner som pointing to the pathXTGEO_TESTDATA_PATH
with the cached data should be sufficient to run the tests.Tests have been updated to be able to use the testdata path
XTGEO_TESTDATA_PATH
set in the test config:XTGEO_TESTDATA_PATH
in the commandpytest ./tests -n 4 -vv --testdatapath $XTGEO_TESTDATA_PATH
.A testrun from can be seen here https://github.com/equinor/rms-sys/actions/runs/13006244695/job/36273691991