From d6edfb15fd5b87eef7f54fcc23fa3e77ee3c34f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Tue, 27 Dec 2022 20:19:00 +0100 Subject: [PATCH] Use codecov instead of coveralls for coverage reporting --- .github/workflows/tests.yaml | 21 +++++++-------------- README.rst | 4 ++-- codecov.yml | 10 ++++++++++ requirements_test.txt | 3 +-- 4 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7f517eb27..59f84b15a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -81,19 +81,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 needs: tests-linux - strategy: - matrix: - python-version: ["3.11"] - env: - COVERAGERC_FILE: .coveragerc steps: - name: Check out code from GitHub uses: actions/checkout@v3.2.0 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.11 id: python uses: actions/setup-python@v4.4.0 with: - python-version: ${{ matrix.python-version }} + python-version: "3.11" check-latest: true - name: Restore Python virtual environment id: cache-venv @@ -114,13 +109,11 @@ jobs: run: | . venv/bin/activate coverage combine coverage*/.coverage - coverage report --rcfile=${{ env.COVERAGERC_FILE }} - - name: Upload coverage to Coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - . venv/bin/activate - coveralls --rcfile=${{ env.COVERAGERC_FILE }} --service=github + coverage xml + - uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + verbose: true benchmark-linux: name: run benchmark / ${{ matrix.python-version }} / Linux diff --git a/README.rst b/README.rst index 974f05e42..c6f212d13 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ .. image:: https://github.com/PyCQA/pylint/actions/workflows/tests.yaml/badge.svg?branch=main :target: https://github.com/PyCQA/pylint/actions -.. image:: https://coveralls.io/repos/github/PyCQA/pylint/badge.svg?branch=main - :target: https://coveralls.io/github/PyCQA/pylint?branch=main +.. image:: https://codecov.io/gh/PyCQA/pylint/branch/main/graph/badge.svg?token=ZETEzayrfk + :target: https://codecov.io/gh/PyCQA/pylint .. image:: https://img.shields.io/pypi/v/pylint.svg :alt: Pypi Package version diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..c45517a33 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,10 @@ +coverage: + status: + patch: + default: + target: 100% + project: + default: + target: 95% +comment: + layout: "reach, diff, flags, files" diff --git a/requirements_test.txt b/requirements_test.txt index 23413293a..c55ab6612 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,7 +1,6 @@ -r requirements_test_pre_commit.txt -r requirements_test_min.txt -coveralls~=3.3 -coverage~=6.5 +coverage~=7.0 pre-commit~=2.21 tbump~=6.9.0 contributors-txt>=0.9.0