| name: PyTest Coverage |
| on: |
| workflow_call: |
| inputs: |
| download-path: |
| required: true |
| type: string |
| jobs: |
| coverage: |
| timeout-minutes: 5 |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout Repo |
| uses: actions/checkout@v3 |
| - name: Setup |
| run: | |
| set -ex |
| python -m pip install --upgrade 'pip<23' wheel |
| pip install coverage[toml]==6.5.0 |
| - name: Download artifacts |
| uses: actions/download-artifact@v3 |
| with: |
| path: ${{ inputs.download-path }} |
| - name: Generate coverage report |
| run: | |
| set -ex |
| |
| |
| ls ${{ inputs.download-path }} | while read x; do mv ${{ inputs.download-path }}/$x/.coverage .coverage.$x; done |
|
|
| python -m coverage combine |
| python -m coverage report |
|
|