|
22 | 22 | fail-fast: false |
23 | 23 |
|
24 | 24 | steps: |
25 | | - - uses: actions/checkout@v2 |
| 25 | + - uses: actions/checkout@v3.1.0 |
26 | 26 | - name: Set up Python |
27 | | - uses: actions/setup-python@v2 |
| 27 | + uses: actions/setup-python@v4 |
28 | 28 | with: |
29 | 29 | python-version: ${{ matrix.python-version }} |
30 | 30 | # Allow debugging with tmate |
|
33 | 33 | if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} |
34 | 34 | with: |
35 | 35 | limit-access-to-actor: true |
36 | | - - uses: actions/cache@v2 |
| 36 | + - uses: actions/cache@v3 |
37 | 37 | id: cache |
38 | 38 | with: |
39 | 39 | path: ${{ env.pythonLocation }} |
|
56 | 56 | - name: Lint |
57 | 57 | if: ${{ matrix.python-version != '3.6.15' }} |
58 | 58 | run: python -m poetry run bash scripts/lint.sh |
| 59 | + - run: mkdir coverage |
59 | 60 | - name: Test |
60 | 61 | run: python -m poetry run bash scripts/test.sh |
61 | | - - name: Upload coverage |
62 | | - uses: codecov/codecov-action@v2 |
| 62 | + env: |
| 63 | + COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }} |
| 64 | + CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} |
| 65 | + - name: Store coverage files |
| 66 | + uses: actions/upload-artifact@v3 |
| 67 | + with: |
| 68 | + name: coverage |
| 69 | + path: coverage |
| 70 | + coverage-combine: |
| 71 | + needs: [test] |
| 72 | + runs-on: ubuntu-latest |
| 73 | + |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v3 |
| 76 | + |
| 77 | + - uses: actions/setup-python@v4 |
| 78 | + with: |
| 79 | + python-version: '3.8' |
| 80 | + |
| 81 | + - name: Get coverage files |
| 82 | + uses: actions/download-artifact@v3 |
| 83 | + with: |
| 84 | + name: coverage |
| 85 | + path: coverage |
| 86 | + |
| 87 | + - run: pip install coverage[toml] |
| 88 | + |
| 89 | + - run: ls -la coverage |
| 90 | + - run: coverage combine coverage |
| 91 | + - run: coverage report |
| 92 | + - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}" |
| 93 | + |
| 94 | + - name: Store coverage HTML |
| 95 | + uses: actions/upload-artifact@v3 |
| 96 | + with: |
| 97 | + name: coverage-html |
| 98 | + path: htmlcov |
0 commit comments