summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-03-20 15:16:52 +0100
committerGitHub <noreply@github.com>2021-03-20 07:16:52 -0700
commit03e10b3cde7767910c1f28f12c8b6078b61eaf96 (patch)
tree64609258a79ff32c27a8258883c2c7b670a71df4 /.github
parent46469786d882b9e8bdf6ad93226d36007319e4dc (diff)
downloadspack-03e10b3cde7767910c1f28f12c8b6078b61eaf96.tar.gz
spack-03e10b3cde7767910c1f28f12c8b6078b61eaf96.tar.bz2
spack-03e10b3cde7767910c1f28f12c8b6078b61eaf96.tar.xz
spack-03e10b3cde7767910c1f28f12c8b6078b61eaf96.zip
QA: reduce number of unit tests for jobs not in the matrix (#22426)
* QA: reduce number of unit tests for jobs not in the matrix * Fixup for CentOS6 dependencies * Put correct conditions back in place * Add dependency on changes
Diffstat (limited to '.github')
-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: