@@ -416,6 +416,64 @@ jobs:
416416 run : python -Im pytest --no-cov --numprocesses=0 -vvvvv --codspeed
417417
418418
419+ cython-coverage :
420+ permissions :
421+ contents : read # to fetch code (actions/checkout)
422+
423+ name : Cython coverage
424+ needs : gen_llhttp
425+ runs-on : ubuntu-latest
426+ steps :
427+ - name : Checkout
428+ uses : actions/checkout@v6
429+ with :
430+ submodules : true
431+ - name : Setup Python
432+ id : python-install
433+ uses : actions/setup-python@v6
434+ with :
435+ python-version : ' 3.12'
436+ - name : Update pip, wheel, setuptools, build, twine
437+ run : |
438+ python -m pip install -U pip wheel setuptools build twine
439+ - name : Install dependencies
440+ run : |
441+ python -Im pip install -r requirements/test.in -c requirements/test.txt
442+ - name : Uninstall blocbuster
443+ run : python -m pip uninstall blockbuster -y
444+ - name : Restore llhttp generated files
445+ uses : actions/download-artifact@v8
446+ with :
447+ name : llhttp
448+ path : vendor/llhttp/build/
449+ - name : Cythonize with linetrace
450+ run : |
451+ make cythonize CYTHON_EXTRA="-X linetrace=True"
452+ - name : Install self
453+ env :
454+ AIOHTTP_CYTHON_TRACE : 1
455+ run : python -m pip install -e .
456+ - name : Run tests with Cython tracing
457+ env :
458+ COLOR : yes
459+ PIP_USER : 1
460+ run : >-
461+ pytest tests/test_client_functional.py tests/test_http_parser.py tests/test_http_writer.py tests/test_web_functional.py tests/test_web_response.py tests/test_websocket_parser.py
462+ --cov-config=.coveragerc-cython.toml
463+ -m 'not dev_mode and not autobahn'
464+ shell : bash
465+ - name : Turn coverage into xml
466+ run : |
467+ python -m coverage xml -o cython-coverage.xml --rcfile=.coveragerc-cython.toml
468+ - name : Upload coverage
469+ uses : codecov/codecov-action@v6
470+ with :
471+ files : ./cython-coverage.xml
472+ disable_search : true
473+ flags : cython-coverage
474+ token : ${{ secrets.CODECOV_TOKEN }}
475+ fail_ci_if_error : true
476+
419477 check : # This job does nothing and is only used for the branch protection
420478 if : always()
421479
0 commit comments