Skip to content

Commit

Permalink
CI: Add script for running tests from github worklow (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
slangeveld authored Jan 20, 2025
1 parent 23f2b9e commit 81aa95b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ci/testrmsenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This shell script is to be sourced and run from a github workflow
# when fmu-tools is to be tested towards a new RMS enviroment

run_tests () {
copy_test_files

install_test_dependencies

pushd $CI_TEST_ROOT
start_tests
popd
}

install_test_dependencies () {
pip install ".[dev]"
}

copy_test_files () {
cp -r $CI_SOURCE_ROOT/tests $CI_TEST_ROOT/tests
# Pytest configuration is in pyproject.toml
cp $CI_SOURCE_ROOT/pyproject.toml $CI_TEST_ROOT
}

start_tests () {
pytest
}

0 comments on commit 81aa95b

Please sign in to comment.