summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/unit_tests.yaml35
1 files changed, 28 insertions, 7 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index 3161bc15e1..385e3a1e46 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -233,13 +233,27 @@ jobs:
flags: shelltests,linux
# Test for Python2.6 run on Centos 6
centos6:
- needs: [ validate, style, documentation ]
+ needs: [ validate, style, documentation, changes ]
runs-on: ubuntu-latest
container: spack/github-actions:centos6
steps:
- - name: Run unit tests
+ - name: Run unit tests (full test-suite)
+ # The CentOS 6 container doesn't run with coverage, but
+ # under the same conditions it runs the full test suite
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
+ env:
+ HOME: /home/spack-test
+ run: |
+ whoami && echo $HOME && cd $HOME
+ git clone https://github.com/spack/spack.git && cd spack
+ git fetch origin ${{ github.ref }}:test-branch
+ git checkout test-branch
+ share/spack/qa/run-unit-tests
+ - name: Run unit tests (only package tests)
+ if: ${{ needs.changes.outputs.with_coverage == 'false' }}
env:
HOME: /home/spack-test
+ ONLY_PACKAGES: true
run: |
whoami && echo $HOME && cd $HOME
git clone https://github.com/spack/spack.git && cd spack
@@ -247,10 +261,12 @@ jobs:
git checkout test-branch
share/spack/qa/run-unit-tests
- # Test RHEL8 UBI with platform Python
+ # Test RHEL8 UBI with platform Python. This job is run
+ # only on PRs modifying core Spack
rhel8-platform-python:
- needs: [ validate, style, documentation ]
+ needs: [ validate, style, documentation, changes ]
runs-on: ubuntu-latest
+ if: ${{ needs.changes.outputs.with_coverage == 'true' }}
container: registry.access.redhat.com/ubi8/ubi
steps:
- name: Install dependencies
@@ -289,9 +305,14 @@ jobs:
. share/spack/setup-env.sh
spack compiler find
spack solve mpileaks%gcc
- coverage run $(which spack) unit-test -v
- coverage combine
- coverage xml
+ if [ "${{ needs.changes.outputs.with_coverage }}" == "true" ]
+ then
+ coverage run $(which spack) unit-test -v -x
+ coverage combine
+ coverage xml
+ else
+ $(which spack) unit-test -m "not maybeslow" -k "package_sanity"
+ fi
- uses: codecov/codecov-action@v1
if: ${{ needs.changes.outputs.with_coverage == 'true' }}
with: