File tree Expand file tree Collapse file tree 5 files changed +29
-5
lines changed
Expand file tree Collapse file tree 5 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 66 notify :
77 # This number needs to be changed whenever the number of runs in CI is changed.
88 # Another option is codecov-cli: https://github.com/codecov/codecov-cli#send-notifications
9- after_n_builds : 27
9+ after_n_builds : 31
1010 wait_for_ci : false
1111 notify_error : true # if uploads fail, replace cov comment with a comment with errors.
1212 require_ci_to_pass : false
Original file line number Diff line number Diff line change @@ -234,15 +234,34 @@ jobs:
234234 cache : pip
235235 # setuptools is needed to get distutils on 3.12, which cythonize requires
236236 - name : install trio and setuptools
237- run : python -m pip install --upgrade pip . setuptools
237+ run : python -m pip install --upgrade pip . setuptools 'coverage[toml]'
238+
239+ - name : add cython plugin to the coveragepy config
240+ run : >-
241+ sed -i 's#plugins\s=\s\[\]#plugins = ["Cython.Coverage"]#'
242+ pyproject.toml
238243
239244 - name : install cython & compile pyx file
245+ env :
246+ CFLAGS : ${{ env.CFLAGS }} -DCYTHON_TRACE_NOGIL=1
240247 run : |
241248 python -m pip install "cython${{ matrix.cython }}"
242- cythonize --inplace tests/cython/test_cython.pyx
249+ cythonize --inplace -X linetrace=True tests/cython/test_cython.pyx
243250
244251 - name : import & run module
245- run : python -c 'import tests.cython.test_cython'
252+ run : coverage run -m tests.cython.run_test_cython
253+
254+ - name : get Python version for codecov flag
255+ id : get-version
256+ run : >-
257+ echo "version=$(python -V | cut -d' ' -f2 | cut -d'.' -f1,2)"
258+ >> "${GITHUB_OUTPUT}"
259+ - if : always()
260+ uses : codecov/codecov-action@v5
261+ with :
262+ name : Cython
263+ flags : Cython,${{ steps.get-version.outputs.version }}
264+ fail_ci_if_error : true
246265
247266 # https://github.com/marketplace/actions/alls-green#why
248267 check : # This job does nothing and is only used for the branch protection
Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ omit = [
296296# The test suite spawns subprocesses to test some stuff, so make sure
297297# this doesn't corrupt the coverage files
298298parallel = true
299+ plugins = []
299300relative_files = true
300301source = [" ." ]
301302
Original file line number Diff line number Diff line change 1+ from .test_cython import invoke_main_entry_point
2+
3+ invoke_main_entry_point ()
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ async def trio_main() -> None:
1919 nursery.start_soon(foo)
2020 nursery.start_soon(foo)
2121
22- trio.run(trio_main)
22+ def invoke_main_entry_point ():
23+ trio.run(trio_main)
You can’t perform that action at this time.
0 commit comments