Skip to content

Added test_coverage.yml #3

Added test_coverage.yml

Added test_coverage.yml #3

Workflow file for this run

name: Test Coverage
on:
push:
pull_request:
jobs:
coverage:

Check failure on line 7 in .github/workflows/test_coverage.yml

View workflow run for this annotation

GitHub Actions / Test Coverage

Invalid workflow file

The workflow is not valid. .github/workflows/test_coverage.yml (Line: 7, Col: 3): The workflow must contain at least one job with no dependencies.
name: Combine & check coverage
if: always()
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Use latest Python, so it understands all syntax.
python-version: "3.12"
- uses: actions/download-artifact@v4
with:
pattern: coverage-data-*
merge-multiple: true
- name: "Combine coverage & fail if it's <50"
run: |
python -Im pip install --upgrade coverage[toml]
python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty
# Report and write to summary.
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
# Report again and fail if under 50%.
python -Im coverage report --fail-under=50
- name: Upload HTML report if check failed
uses: actions/upload-artifact@v4
with:
name: html-report
path: htmlcov
if: ${{ failure() }}