Skip to content

Commit

Permalink
build: update codecov action to use repo-specific tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Apr 25, 2024
1 parent d060c7f commit 800b201
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 60 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[run]
branch = True
relative_files = True
data_file = .coverage
source=event_routing_backends
omit =
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ jobs:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, pii_check, django32, django42]
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -46,19 +38,8 @@ jobs:

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: py-cov-action/python-coverage-comment-action@v3
uses: codecov/codecov-action@v4
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 85
ANNOTATE_MISSING_LINES: true
ANNOTATION_TYPE: error

- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
name: python-coverage-comment-action
# If you use a different name, update COMMENT_FILENAME accordingly
path: python-coverage-comment-action.txt
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/coverage.yml

This file was deleted.

0 comments on commit 800b201

Please sign in to comment.