Skip to content
Snippets Groups Projects
Unverified Commit 726c931b authored by Ammar Askar's avatar Ammar Askar Committed by GitHub
Browse files

bpo-43888: Remove coverage builds from CI (GH-25679)

The coverage builds were consistently timing out in CI, suggesting that people were not reviewing the uploaded reports.
parent 6143fcdf
No related branches found
No related tags found
No related merge requests found
codecov:
strict_yaml_branch: master
notify:
require_ci_to_pass: true
comment: off
ignore:
- "Doc/**/*"
- "Misc/**/*"
- "Mac/**/*"
- "PC/**/*"
- "PCbuild/**/*"
- "Tools/**/*"
- "Grammar/*"
coverage:
precision: 2
range: 70...90
round: down
status:
changes: off
project: off
patch: off
parsers:
gcov:
branch_detection:
conditional: true
loop: true
macro: false
method: false
javascript:
enable_partials: false
name: Coverage
on:
push:
branches:
- master
- 3.9
- 3.8
- 3.7
paths-ignore:
- 'Doc/**'
- 'Misc/**'
#pull_request:
# branches:
# - master
# - 3.9
# - 3.8
# - 3.7
# paths-ignore:
# - 'Doc/**'
# - 'Misc/**'
jobs:
coverage_ubuntu:
name: 'Ubuntu (Coverage)'
runs-on: ubuntu-latest
env:
OPENSSL_VER: 1.1.1k
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
- name: Install OpenSSL
if: steps.cache-openssl.outputs.cache-hit != 'true'
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
- name: Configure CPython
run: ./configure --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
- name: Build CPython
run: make -j4
- name: Display build info
run: make pythoninfo
- name: 'Coverage Preparation'
run: |
./python -m venv .venv
source ./.venv/bin/activate
python -m pip install -U coverage
python -m pip install -r Misc/requirements-test.txt
python -m test.pythoninfo
export PYTHONPATH=`find .venv -name fullcoverage`
- name: 'Tests with coverage'
timeout-minutes: 100 # 1h40m, ref https://bugs.python.org/issue43888
run: >
source ./.venv/bin/activate &&
xvfb-run 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
- name: 'Publish code coverage results'
run: |
export PYTHONPATH=
source ./.venv/bin/activate
bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
c_coverage_ubuntu:
name: 'Ubuntu (C Coverage)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Configure CPython
run: ./configure
- name: 'Build CPython and measure coverage'
run: xvfb-run make -j4 coverage-report
- name: 'Publish code coverage results'
if: always()
run: |
make pythoninfo
bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
......@@ -69,61 +69,6 @@ matrix:
- make -C Doc/ PYTHON=../python venv
script:
xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" doctest
- name: "Test code coverage (Python)"
os: linux
language: c
compiler: gcc
env: OPTIONAL=true
addons:
apt:
packages:
- xvfb
before_script:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]
then
echo "Don't run Python coverage on pull requests."
exit
fi
- ./configure
- make -j4
# Need a venv that can parse covered code.
- ./python -m venv venv
- ./venv/bin/python -m pip install -U coverage
- ./venv/bin/python -m pip install -r Misc/requirements-test.txt
- ./venv/bin/python -m test.pythoninfo
- export PYTHONPATH=`find venv -name fullcoverage`
script:
# 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
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.
- export PYTHONPATH=
- source ./venv/bin/activate
- bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
- name: "Test code coverage (C)"
os: linux
language: c
compiler: gcc
env: OPTIONAL=true
addons:
apt:
packages:
- lcov
- xvfb
before_script:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]
then
echo "Don't run C coverage on pull requests."
exit
fi
- ./configure
script:
- xvfb-run make -j4 coverage-report
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
- make pythoninfo
- bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
before_install:
......
......@@ -13,10 +13,6 @@ This is Python version 3.10.0 alpha 7
:alt: CPython build status on Azure DevOps
:target: https://dev.azure.com/python/cpython/_build/latest?definitionId=4&branchName=master
.. image:: https://codecov.io/gh/python/cpython/branch/master/graph/badge.svg
:alt: CPython code coverage on Codecov
:target: https://codecov.io/gh/python/cpython
.. image:: https://img.shields.io/badge/discourse-join_chat-brightgreen.svg
:alt: Python Discourse chat
:target: https://discuss.python.org/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment