From 9894eb99e680363bb56856c8035ff225e87b28a1 Mon Sep 17 00:00:00 2001 From: michaelroytman Date: Fri, 19 Apr 2024 13:59:12 -0400 Subject: [PATCH 1/2] feat: replace codecov with python-coverage-comment The codecov action has been failing for a few weeks. This replaces the use of codecov with python-coverage-comment, which is the tool used in other private repositories. --- .coveragerc | 1 + .github/workflows/ci.yml | 9 ++++++--- requirements/ci.in | 1 + requirements/ci.txt | 2 ++ requirements/dev.txt | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.coveragerc b/.coveragerc index 4296f78..f41de6a 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,7 @@ [run] branch = True data_file = .coverage +relative_files = True source=token_utils omit = test_settings diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07b2182..920d5c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,10 @@ jobs: - name: Run coverage if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' - uses: codecov/codecov-action@v2 + uses: py-cov-action/python-coverage-comment-action@v3 with: - flags: unittests - fail_ci_if_error: true + GITHUB_TOKEN: ${{ github.token }} + MINIMUM_GREEN: 95 + MINIMUM_ORANGE: 84 + ANNOTATE_MISSING_LINES: true + ANNOTATION_TYPE: error diff --git a/requirements/ci.in b/requirements/ci.in index 3586cbe..07dcee7 100644 --- a/requirements/ci.in +++ b/requirements/ci.in @@ -3,3 +3,4 @@ -c constraints.txt tox # Virtualenv management for tests +coverage # Python code coverage \ No newline at end of file diff --git a/requirements/ci.txt b/requirements/ci.txt index c085cbc..2e918e8 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -10,6 +10,8 @@ chardet==5.2.0 # via tox colorama==0.4.6 # via tox +coverage==7.4.4 + # via -r requirements/ci.in distlib==0.3.8 # via virtualenv filelock==3.13.3 diff --git a/requirements/dev.txt b/requirements/dev.txt index 7e9158d..c4e3d9b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -60,6 +60,7 @@ colorama==0.4.6 # tox coverage[toml]==7.4.4 # via + # -r requirements/ci.txt # -r requirements/quality.txt # pytest-cov diff-cover==8.0.3 From 82e3801dd7cc0b406b871c6a3e7eab6195ad8696 Mon Sep 17 00:00:00 2001 From: Zacharis278 Date: Fri, 26 Apr 2024 14:15:42 -0400 Subject: [PATCH 2/2] build: remove codecov conf --- codecov.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 4da4768..0000000 --- a/codecov.yml +++ /dev/null @@ -1,12 +0,0 @@ -coverage: - status: - project: - default: - enabled: yes - target: auto - patch: - default: - enabled: yes - target: 100% - -comment: false