Skip to content

Commit

Permalink
GitHub actions: save coverage data as artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: flashdagger <flashdagger@googlemail.com>
  • Loading branch information
flashdagger committed Apr 1, 2024
1 parent 23dbd9d commit 2709a3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ jobs:
- name: Unit tests with pytest
run: |
poetry run pytest
env:
COVERAGE_FILE: .coverage.{{ matrix.python-version }}
- name: Upload coverage data
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: coverage_data
if-no-files-found: warn
path: ./.coverage*
compression-level: 0 # no compression
retention-days: 1
- name: prepare coverage data
continue-on-error: true
run: |
Expand Down Expand Up @@ -68,3 +79,15 @@ jobs:
if: ${{ matrix.python-version != '3.8' }}
run: |
poetry run pylint ./zammadoo
process-test-data:
runs-on: ubuntu-latest
needs: test
if: success() || failure()
steps:
- name: Download coverage data
uses: actions/download-artifact@v4
with:
path: .coverage*
- name: Display structure of downloaded files
run: ls -lR
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ src_paths = ["zammadoo", "tests"]
# see: https://pytest-cov.readthedocs.io/en/latest/config.html
[tool.pytest.ini_options]
minversion = "7.4"
addopts = "tests -v --tb=short --cov=zammadoo --cov-report html --mypy-only-local-stub --benchmark-max-time=0.1"
addopts = "tests -v --tb=short --cov=zammadoo --mypy-only-local-stub --benchmark-max-time=0.1"
cache_dir = ".cache/pytest"
markers = ["no_record"]

Expand Down

0 comments on commit 2709a3e

Please sign in to comment.