File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,23 +35,27 @@ mkdir -p test-artefacts
3535
3636echo " Running ${TEST_TYPE} tests..."
3737
38- # Set coverage path based on test type
3938if [[ " $TEST_TYPE " = " unit" ]]; then
4039 COV_PATH=" ."
40+
41+ poetry run pytest ${TEST_PATH} -v \
42+ --cov=${COV_PATH} \
43+ --cov-report=html:test-artefacts/coverage-html \
44+ --cov-report=term \
45+ --junit-xml=" test-artefacts/${TEST_TYPE} -tests.xml" \
46+ --html=" test-artefacts/${TEST_TYPE} -tests.html" --self-contained-html
4147else
4248 COV_PATH=" src/gateway_api"
49+ TEST_ENV=" ${ENV:- local} "
50+
51+ poetry run pytest ${TEST_PATH} -v \
52+ --env=" ${TEST_ENV} " \
53+ --cov=${COV_PATH} \
54+ --cov-report=html:test-artefacts/coverage-html \
55+ --cov-report=term \
56+ --junit-xml=" test-artefacts/${TEST_TYPE} -tests.xml" \
57+ --html=" test-artefacts/${TEST_TYPE} -tests.html" --self-contained-html
4358fi
4459
45- TEST_ENV=" ${ENV:- local} "
46-
47- # Note: TEST_PATH is intentionally unquoted to allow glob expansion for unit tests
48- poetry run pytest ${TEST_PATH} -v \
49- --env=" ${TEST_ENV} " \
50- --cov=${COV_PATH} \
51- --cov-report=html:test-artefacts/coverage-html \
52- --cov-report=term \
53- --junit-xml=" test-artefacts/${TEST_TYPE} -tests.xml" \
54- --html=" test-artefacts/${TEST_TYPE} -tests.html" --self-contained-html
55-
5660# Save coverage data file for merging
5761mv .coverage " test-artefacts/coverage.${TEST_TYPE} "
You can’t perform that action at this time.
0 commit comments