Skip to content

Commit 4384206

Browse files
committed
coverage not on mypy
1 parent e69ace4 commit 4384206

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
permissions:
1313
contents: read
14-
pull-requests: write
1514

1615
env:
1716
FORCE_COLOR: 1
@@ -66,11 +65,13 @@ jobs:
6665
allow-prereleases: true
6766

6867
- name: Install coverage
68+
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
6969
run: |
7070
# Be wary that this does not install typing_extensions in the future
7171
pip install coverage
72-
73-
- name: Test typing_extensions
72+
73+
- name: Test typing_extensions with coverage
74+
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
7475
run: |
7576
# Be wary of running `pip install` here, since it becomes easy for us to
7677
# accidentally pick up typing_extensions as installed by a dependency
@@ -79,8 +80,18 @@ jobs:
7980
export COVERAGE_FILE=.coverage_${{ matrix.python-version }}
8081
# Run with coverage omit files that are executed in tempfiles
8182
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
8292
8393
- name: Archive code coverage results
94+
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
8495
uses: actions/upload-artifact@v4
8596
with:
8697
name: .coverage_${{ matrix.python-version }}
@@ -132,6 +143,10 @@ jobs:
132143
runs-on: ubuntu-latest
133144

134145
needs: [tests]
146+
permissions:
147+
contents: read
148+
pull-requests: write
149+
135150

136151
if: ${{ always() }}
137152

@@ -172,7 +187,7 @@ jobs:
172187
indicators: true
173188
output: both
174189
thresholds: '80 90'
175-
190+
176191
- name: Add Coverage PR Comment
177192
uses: marocchino/sticky-pull-request-comment@v2
178193
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)