bpo-40474: Updated coverage.yml to better report coverage stats (#19851)
Currently modules which are imported early are misreported in coverage. A fix is documented in the devguide, but the fix wasn't being used in CI.
This commit is contained in:
parent
cfc6ce4d40
commit
d9c1f19919
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@ -52,6 +52,7 @@ jobs:
|
|||||||
python -m pip install -U coverage
|
python -m pip install -U coverage
|
||||||
python -m pip install -r Misc/requirements-test.txt
|
python -m pip install -r Misc/requirements-test.txt
|
||||||
python -m test.pythoninfo
|
python -m test.pythoninfo
|
||||||
|
export PYTHONPATH=`find .venv -name fullcoverage`
|
||||||
- name: 'Tests with coverage'
|
- name: 'Tests with coverage'
|
||||||
run: >
|
run: >
|
||||||
source ./.venv/bin/activate &&
|
source ./.venv/bin/activate &&
|
||||||
@ -67,6 +68,7 @@ jobs:
|
|||||||
|| true
|
|| true
|
||||||
- name: 'Publish code coverage results'
|
- name: 'Publish code coverage results'
|
||||||
run: |
|
run: |
|
||||||
|
export PYTHONPATH=
|
||||||
source ./.venv/bin/activate
|
source ./.venv/bin/activate
|
||||||
bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
|
bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
|
||||||
env:
|
env:
|
||||||
|
@ -89,11 +89,13 @@ matrix:
|
|||||||
- ./venv/bin/python -m pip install -U coverage
|
- ./venv/bin/python -m pip install -U coverage
|
||||||
- ./venv/bin/python -m pip install -r Misc/requirements-test.txt
|
- ./venv/bin/python -m pip install -r Misc/requirements-test.txt
|
||||||
- ./venv/bin/python -m test.pythoninfo
|
- ./venv/bin/python -m test.pythoninfo
|
||||||
|
- export PYTHONPATH=`find venv -name fullcoverage`
|
||||||
script:
|
script:
|
||||||
# Skip tests that re-run the entire test suite.
|
# Skip tests that re-run the entire test suite.
|
||||||
- xvfb-run ./venv/bin/python -m coverage run --branch --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures || true
|
- xvfb-run ./venv/bin/python -m coverage run --branch --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures || true
|
||||||
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
|
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
|
||||||
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
|
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
|
||||||
|
- export PYTHONPATH=
|
||||||
- source ./venv/bin/activate
|
- source ./venv/bin/activate
|
||||||
- bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
|
- bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
|
||||||
- name: "Test code coverage (C)"
|
- name: "Test code coverage (C)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user