diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5531687401..0972b000436 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,6 +80,13 @@ jobs: - name: "ubuntu-py37" python: "3.7" os: ubuntu-latest + # Coverage for: + # - pytester's LsofFdLeakChecker + # - TestArgComplete (linux only) + # - numpy + # - old attrs + # - verbose=0 + # - test_sys_breakpoint_interception (via pexpect). tox_env: "py37-lsof-numpy-oldattrs-pexpect-twisted" - name: "ubuntu-py37-pluggy" python: "3.7" @@ -106,6 +113,9 @@ jobs: python: "3.7" os: macos-latest tox_env: "py37-xdist" + env: + # Cover verbose=1. + PYTEST_ADDOPTS: -v - name: "macos-py38" python: "3.8" os: macos-latest diff --git a/.travis.yml b/.travis.yml index 59c7951e407..30f15867d75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,32 +16,6 @@ install: jobs: include: - # OSX tests - first (in test stage), since they are the slower ones. - # Coverage for: - # - osx - # - verbose=1 - - os: osx - osx_image: xcode10.1 - language: generic - env: TOXENV=py37-xdist PYTEST_COVERAGE=1 PYTEST_ADDOPTS=-v - before_install: - - which python3 - - python3 -V - - ln -sfn "$(which python3)" /usr/local/bin/python - - python -V - - test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 37 - - # Full run of latest supported version, without xdist. - # Coverage for: - # - pytester's LsofFdLeakChecker - # - TestArgComplete (linux only) - # - numpy - # - old attrs - # - verbose=0 - # - test_sys_breakpoint_interception (via pexpect). - - env: TOXENV=py37-lsof-numpy-oldattrs-pexpect-twisted PYTEST_COVERAGE=1 PYTEST_ADDOPTS= - python: '3.7' - # Coverage for Python 3.5.{0,1} specific code, mostly typing related. - env: TOXENV=py35 PYTEST_COVERAGE=1 PYTEST_ADDOPTS="-k test_raises_cyclic_reference" python: '3.5.1' diff --git a/codecov.yml b/codecov.yml index db2472009c6..82ad2c212a1 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1 +1,5 @@ comment: off +coverage: + status: + changes: + default: on diff --git a/scripts/report-coverage.sh b/scripts/report-coverage.sh index fbcf20ca929..bccf6a21ca0 100755 --- a/scripts/report-coverage.sh +++ b/scripts/report-coverage.sh @@ -15,4 +15,7 @@ python -m coverage xml python -m coverage report -m # Set --connect-timeout to work around https://github.com/curl/curl/issues/4461 curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh -bash codecov-upload.sh -Z -X fix -f coverage.xml "$@" + +base_branch="${GITHUB_BASE_REF:-${TRAVIS_BRANCH}}" +base_commit=$(git merge-base FETCH_HEAD "origin/$base_branch") +bash codecov-upload.sh -Z -X fix -f coverage.xml -N "$base_commit" "$@"