File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This shell script is to be sourced and run from a github workflow
2+ # when fmu-config is to be tested towards a new RMS Python enviroment
3+
4+ run_tests () {
5+ set_test_variables
6+
7+ copy_test_files
8+
9+ install_test_dependencies
10+
11+ run_pytest
12+ }
13+
14+ set_test_variables () {
15+ echo " Setting variables for fmu-config tests..."
16+ CI_TEST_ROOT=$CI_ROOT /fmuconfig-test-root
17+ }
18+
19+ copy_test_files () {
20+ echo " Copy fmu-config test files to test folder $CI_TEST_ROOT ..."
21+ mkdir -p $CI_TEST_ROOT
22+ cp -r $PROJECT_ROOT /tests $CI_TEST_ROOT
23+ cp $PROJECT_ROOT /pyproject.toml $CI_TEST_ROOT
24+ }
25+
26+ install_test_dependencies () {
27+ echo " Installing test dependencies..."
28+ pip install " .[tests]"
29+
30+ echo " Dependencies installed successfully. Listing installed dependencies..."
31+ pip list
32+ }
33+
34+ run_pytest () {
35+ echo " Running fmu-config tests with pytest..."
36+ pushd $CI_TEST_ROOT
37+ pytest ./tests -n 4 -vv
38+ popd
39+ }
You can’t perform that action at this time.
0 commit comments