9999 path : ./src/.coverage*
100100 include-hidden-files : true
101101 compression-level : 0 # no compression
102+
103+ - name : Save PR number for coverage report
104+ if : ${{ !startsWith(matrix.python-version, 'pypy') }}
105+ run : |
106+ mkdir -p ./pr
107+ echo ${{ github.event.number }} > ./pr/NR
108+ - uses : actions/upload-artifact@v4
109+ if : ${{ !startsWith(matrix.python-version, 'pypy') }}
110+ with :
111+ name : pr
112+ path : pr/
102113
103114 - name : Test CPython typing test suite
104115 # Test suite fails on PyPy even without typing_extensions
@@ -136,63 +147,4 @@ jobs:
136147 repo: "typing_extensions",
137148 title: `Daily tests failed on ${new Date().toDateString()}`,
138149 body: "Runs listed here: https://github.com/python/typing_extensions/actions/workflows/ci.yml",
139- })
140-
141- report-coverage :
142- name : Report coverage
143-
144- runs-on : ubuntu-latest
145-
146- needs : [tests]
147- permissions :
148- contents : read
149- pull-requests : write
150-
151- if : ${{ always() }}
152-
153- steps :
154- - uses : actions/checkout@v4
155- with :
156- persist-credentials : false
157- - name : Set up Python
158- uses : actions/setup-python@v5
159- with :
160- python-version : " 3"
161- - name : Download coverage artifacts
162- uses : actions/download-artifact@v4
163- with :
164- pattern : .coverage_*
165- path : .
166- # merge only when files are named differently
167- merge-multiple : true
168- - name : Install dependencies
169- run : pip install coverage
170- - name : Combine coverage results
171- run : |
172- # List the files to see what we have
173- echo "Combining coverage files..."
174- ls -aR .coverage*
175- coverage combine .coverage*
176- echo "Creating coverage report..."
177- coverage report
178- coverage xml
179-
180- - name : Code Coverage Report
181- uses : irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
182- with :
183- filename : coverage.xml
184- badge : true
185- fail_below_min : false
186- format : markdown
187- hide_branch_rate : false
188- hide_complexity : true
189- indicators : true
190- output : both
191- thresholds : ' 80 90'
192-
193- - name : Add Coverage PR Comment
194- uses : marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.3
195- if : github.event_name == 'pull_request'
196- with :
197- recreate : true
198- path : code-coverage-results.md
150+ })
0 commit comments