Skip to content

Commit

Permalink
ci: coverage to distinct pr comments (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato authored May 3, 2023
1 parent c7b8e24 commit f66ed1e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,29 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@v2
continue-on-error: true
with:
files: artifacts/**/*junit-report.xml
- name: Publish Coverage Report
files: artifacts/*/junit-report.xml

- name: Publish Coverage Report for Ubuntu
uses: 5monkeys/cobertura-action@master
if: ${{ github.event_name == 'pull_request' }}
with:
path: artifacts/unit-test-results-python3.11-ubuntu-latest/coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 70
fail_below_threshold: false
only_changed_files: true
report_name: Code Coverage (Ubuntu)

- name: Publish Coverage Report for Windows
uses: 5monkeys/cobertura-action@master
if: ${{ github.event_name == 'pull_request' }}
with:
path: artifacts/**/*python3.11*coverage.xml
path: artifacts/unit-test-results-python3.11-windows-latest/coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 70
fail_below_threshold: false
only_changed_files: true
report_name: Tests Coverage Report for Ubuntu and Windows (python3.11)
report_name: Code Coverage (Windows)

build-docs:
name: Build the docs
Expand Down
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,3 @@ select = D1
add_ignore = D107,D100,D105
# Don't require docstrings for tests or setup
match = (?!test|setup).*\.py

[coverage:run]
omit = tests/*
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ commands =
mkdir -p test-reports
pytest -v --instafail \
-n auto --dist loadscope \
--cov --cov-report term-missing \
--cov=eodag \
--cov-report term-missing \
--cov-report=html:test-reports/coverage \
--cov-report=xml:test-reports/coverage.xml \
--junitxml=test-reports/junit-report.xml \
Expand Down

0 comments on commit f66ed1e

Please sign in to comment.