CI: drastically reduce the number of tests for package only PRs (#22410)
PRs that change only package recipes will only run tests under "package_sanity.py" and without coverage. This should result in a huge drop the cpu-time spent in CI for most PRs.
This commit is contained in:
parent
245d67ed5c
commit
629f94b4e1
2
.github/workflows/unit_tests.yaml
vendored
2
.github/workflows/unit_tests.yaml
vendored
@ -332,7 +332,7 @@ jobs:
|
|||||||
coverage xml
|
coverage xml
|
||||||
else
|
else
|
||||||
echo "ONLY PACKAGE RECIPES CHANGED [skipping coverage]"
|
echo "ONLY PACKAGE RECIPES CHANGED [skipping coverage]"
|
||||||
$(which spack) unit-test -x -m "not maybeslow"
|
$(which spack) unit-test -x -m "not maybeslow" -k "package_sanity"
|
||||||
fi
|
fi
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
|
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
|
||||||
|
@ -44,7 +44,7 @@ spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
if [[ "$ONLY_PACKAGES" == "true" ]]; then
|
if [[ "$ONLY_PACKAGES" == "true" ]]; then
|
||||||
echo "ONLY PACKAGE RECIPES CHANGED [skipping slow unit tests]"
|
echo "ONLY PACKAGE RECIPES CHANGED [skipping slow unit tests]"
|
||||||
export PYTEST_ADDOPTS='-m "not maybeslow"'
|
export PYTEST_ADDOPTS='-k "package_sanity" -m "not maybeslow"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$coverage_run $(which spack) unit-test -x --verbose
|
$coverage_run $(which spack) unit-test -x --verbose
|
||||||
|
Loading…
Reference in New Issue
Block a user