feat: integrate Codecov v5 with test results and add comprehensive status badges
- Update Codecov action from v3 to v5 with token authentication - Add Codecov test results action v1 for test analytics - Update pytest to generate JUnit XML for test results - Add comprehensive status badges to README including: - Codecov coverage badge - CI/CD workflow status badges (Tests, Docker CI, CodeQL) - GitHub release, license, and Python version badges - Social badges for stars, forks, issues, and PRs Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -40,14 +40,21 @@ jobs:
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: Run Tests
|
||||
run: pytest tests/ -v --cov=app --cov-report=xml --cov-report=term
|
||||
run: pytest tests/ -v --cov=app --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy
|
||||
|
||||
- name: Upload Coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: ./coverage.xml
|
||||
fail_ci_if_error: false
|
||||
|
||||
- name: Upload test results to Codecov
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/test-results-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Run Linter (Flake8)
|
||||
run: flake8 app/ --max-line-length=120 --extend-ignore=E203,W503
|
||||
continue-on-error: false
|
||||
|
||||
Reference in New Issue
Block a user