mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-20 19:05:24 +00:00
Enhance CI with JUnit XML output and Codecov results
Added JUnit XML output for pytest and Codecov test results upload.
This commit is contained in:
@@ -73,7 +73,7 @@ jobs:
|
||||
pip install .[build]
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
pytest --cov --cov-report=xml tests.py
|
||||
pytest --cov --cov-report=xml -junitxml=junit.xml -o junit_family=legacy tests.py
|
||||
- name: Test sample DMARC reports
|
||||
run: |
|
||||
pip install -e .
|
||||
@@ -83,3 +83,13 @@ jobs:
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
- name: Upload test results to Codecov
|
||||
# Feeds Codecov Test Analytics (flaky-test detection, per-test
|
||||
# history). Runs even on test failure so failed cases still get
|
||||
# reported. Uses the same CODECOV_TOKEN as the coverage upload.
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/test-results-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: ./junit.xml
|
||||
|
||||
Reference in New Issue
Block a user