test: add package coverage reporting workflow #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Package Test Coverage | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| package-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install package test dependencies | |
| working-directory: ./package | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[test]" | |
| - name: Run package tests with coverage | |
| working-directory: ./package | |
| run: | | |
| python -m pytest --cov=pyaslreport --cov-report=term-missing --cov-report=xml:coverage.xml --junitxml=pytest.xml | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: package-test-artifacts | |
| path: | | |
| package/coverage.xml | |
| package/pytest.xml |