|
11 | 11 |
|
12 | 12 | permissions: |
13 | 13 | contents: read |
14 | | - pull-requests: write |
15 | 14 |
|
16 | 15 | env: |
17 | 16 | FORCE_COLOR: 1 |
@@ -66,11 +65,13 @@ jobs: |
66 | 65 | allow-prereleases: true |
67 | 66 |
|
68 | 67 | - name: Install coverage |
| 68 | + if: ${{ !startsWith(matrix.python-version, 'pypy') }} |
69 | 69 | run: | |
70 | 70 | # Be wary that this does not install typing_extensions in the future |
71 | 71 | pip install coverage |
72 | | - |
73 | | - - name: Test typing_extensions |
| 72 | +
|
| 73 | + - name: Test typing_extensions with coverage |
| 74 | + if: ${{ !startsWith(matrix.python-version, 'pypy') }} |
74 | 75 | run: | |
75 | 76 | # Be wary of running `pip install` here, since it becomes easy for us to |
76 | 77 | # accidentally pick up typing_extensions as installed by a dependency |
|
79 | 80 | export COVERAGE_FILE=.coverage_${{ matrix.python-version }} |
80 | 81 | # Run with coverage omit files that are executed in tempfiles |
81 | 82 | coverage run --omit ann_module*,inspect* -m unittest test_typing_extensions.py |
| 83 | + |
| 84 | + - name: Test typing_extensions no coverage on pypy |
| 85 | + if: ${{ startsWith(matrix.python-version, 'pypy') }} |
| 86 | + run: | |
| 87 | + # Be wary of running `pip install` here, since it becomes easy for us to |
| 88 | + # accidentally pick up typing_extensions as installed by a dependency |
| 89 | + cd src |
| 90 | + python --version # just to make sure we're running the right one |
| 91 | + python -m unittest test_typing_extensions.py |
82 | 92 |
|
83 | 93 | - name: Archive code coverage results |
| 94 | + if: ${{ !startsWith(matrix.python-version, 'pypy') }} |
84 | 95 | uses: actions/upload-artifact@v4 |
85 | 96 | with: |
86 | 97 | name: .coverage_${{ matrix.python-version }} |
@@ -132,6 +143,10 @@ jobs: |
132 | 143 | runs-on: ubuntu-latest |
133 | 144 |
|
134 | 145 | needs: [tests] |
| 146 | + permissions: |
| 147 | + contents: read |
| 148 | + pull-requests: write |
| 149 | + |
135 | 150 |
|
136 | 151 | if: ${{ always() }} |
137 | 152 |
|
@@ -172,7 +187,7 @@ jobs: |
172 | 187 | indicators: true |
173 | 188 | output: both |
174 | 189 | thresholds: '80 90' |
175 | | - |
| 190 | + |
176 | 191 | - name: Add Coverage PR Comment |
177 | 192 | uses: marocchino/sticky-pull-request-comment@v2 |
178 | 193 | if: github.event_name == 'pull_request' |
|
0 commit comments