diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-09-10 15:25:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 07:25:44 -0600 |
commit | 1427ddaa59df661e9fe3f4b8939eb92fd1b83a88 (patch) | |
tree | 6f6c2d88ef8fe102ac297e244359e5577bfaeb36 /.github/workflows | |
parent | b4a2b8d46c952eb03299dd9c300670c74f802d71 (diff) | |
download | spack-1427ddaa59df661e9fe3f4b8939eb92fd1b83a88.tar.gz spack-1427ddaa59df661e9fe3f4b8939eb92fd1b83a88.tar.bz2 spack-1427ddaa59df661e9fe3f4b8939eb92fd1b83a88.tar.xz spack-1427ddaa59df661e9fe3f4b8939eb92fd1b83a88.zip |
ci: restore coverage computation (#32585)
* ci: restore coverage computation
* Mark "test_foreground_background" as xfail
* Mark "test_foreground_background_output" as xfail
* Make number of processes explicit, remove verbosity on linux
* Run coverage on just 3 Python jobs for linux
* Run coverage on just 3 Python jobs for linux
* Run coverage on just 2 Python jobs for linux
* Add back verbose, since before we didn't encounter the xdist internal error
* Reduce the workers to 2
* Try to use command line
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/unit_tests.yaml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 5de7d86c56..c3c2b3242e 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -52,7 +52,7 @@ jobs: patchelf cmake bison libbison-dev kcov - name: Install Python packages run: | - pip install --upgrade pip six setuptools pytest codecov "coverage[toml]<=6.2" pytest-xdist + pip install --upgrade pip six setuptools pytest codecov[toml] pytest-cov pytest-xdist # ensure style checks are not skipped in unit tests for python >= 3.6 # note that true/false (i.e., 1/0) are opposite in conditions in python and bash if python -c 'import sys; sys.exit(not sys.version_info >= (3, 6))'; then @@ -75,16 +75,18 @@ jobs: . share/spack/setup-env.sh spack bootstrap untrust spack-install spack -v solve zlib - - name: Run unit tests (full suite with coverage) + - name: Run unit tests env: SPACK_PYTHON: python - COVERAGE: true SPACK_TEST_SOLVER: ${{ matrix.concretizer }} + SPACK_TEST_PARALLEL: 2 + COVERAGE: true + UNIT_TEST_COVERAGE: ${{ (matrix.concretizer == 'original' && matrix.python-version == '2.7') || (matrix.python-version == '3.10') }} run: | share/spack/qa/run-unit-tests - coverage combine + coverage combine -a coverage xml - - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0 + - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 with: flags: unittests,linux,${{ matrix.concretizer }} # Test shell integration @@ -115,7 +117,7 @@ jobs: COVERAGE: true run: | share/spack/qa/run-shell-tests - - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0 + - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 with: flags: shelltests,linux @@ -163,7 +165,7 @@ jobs: patchelf kcov - name: Install Python packages run: | - pip install --upgrade pip six setuptools pytest codecov coverage[toml]==6.2 clingo pytest-xdist + pip install --upgrade pip six setuptools pytest codecov coverage[toml] pytest-cov clingo pytest-xdist - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -175,7 +177,7 @@ jobs: SPACK_TEST_SOLVER: clingo run: | share/spack/qa/run-unit-tests - coverage combine + coverage combine -a coverage xml - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0 with: @@ -196,13 +198,14 @@ jobs: - name: Install Python packages run: | pip install --upgrade pip six setuptools - pip install --upgrade pytest codecov coverage[toml]==6.2 pytest-xdist + pip install --upgrade pytest codecov coverage[toml] pytest-xdist pytest-cov - name: Setup Homebrew packages run: | brew install dash fish gcc gnupg2 kcov - name: Run unit tests env: SPACK_TEST_SOLVER: clingo + SPACK_TEST_PARALLEL: 4 run: | git --version . .github/workflows/setup_git.sh @@ -210,13 +213,12 @@ jobs: $(which spack) bootstrap untrust spack-install $(which spack) solve zlib common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x) - coverage run $(which spack) unit-test "${common_args[@]}" - coverage combine + $(which spack) unit-test --cov --cov-config=pyproject.toml "${common_args[@]}" + coverage combine -a coverage xml # Delete the symlink going from ./lib/spack/docs/_spack_root back to # the initial directory, since it causes ELOOP errors with codecov/actions@2 rm lib/spack/docs/_spack_root - - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0 + - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 with: - files: ./coverage.xml flags: unittests,macos |