Skip to content

Commit 39120c6

Browse files
authored
fix: Remove codecov token (#312)
This PR addresses #309 Tested using the same commit on https://github.com/hyperrealist/python-copier-template.git, and for public repositories you get codecov as expected: ![codecov](https://codecov.io/gh/test-tokenless-codecov-dls/test3/branch/main/graph/badge.svg) Test repository: https://github.com/test-tokenless-codecov-dls/test3.git
1 parent b4da80f commit 39120c6

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

.github/workflows/_test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
type: string
1010
description: The runner to run this job on
1111
required: true
12-
secrets:
13-
CODECOV_TOKEN:
14-
required: true
1512

1613
env:
1714
# https://github.com/pytest-dev/pytest/issues/2042
@@ -40,5 +37,3 @@ jobs:
4037
with:
4138
name: ${{ inputs.python-version }}/${{ inputs.runs-on }}
4239
files: cov.xml
43-
env:
44-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
uses: ./.github/workflows/_test.yml
1919
with:
2020
runs-on: ubuntu-latest
21-
secrets:
22-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2321

2422
docs:
2523
uses: ./.github/workflows/_docs.yml

docs/how-to/coverage.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Code coverage is reported to the command line and to a `cov.xml` file by the com
66
(installing-codecov-github-app)=
77
## Installing Codecov GitHub app
88

9-
If your repo is hosted in the DiamondLightSource org, then the codecov GitHub app is already installed and a global token stored so you don't need to do anything.
9+
If your repo is hosted in the DiamondLightSource org, then the codecov GitHub app is already installed so you don't need to do anything.
1010

1111
If your repo is in an org where the codecov GitHub app is not installed, then follow these steps to install it on the org:
1212

@@ -17,6 +17,4 @@ If your repo is in an org where the codecov GitHub app is not installed, then fo
1717

1818
![Install Codecov](../images/gh-install-codecov.png)
1919

20-
Now you need to visit `https://app.codecov.io/account/gh/<org_name>/org-upload-token` to generate a token for your org, and store it as a secret named `CODECOV_TOKEN` in `https://github.com/organizations/<org_name>/settings/secrets/actions`
21-
22-
Next time you create a pull request or merge to main, the code coverage will be uploaded, and the badge on the repository updated.
20+
Next time you create a pull request or merge to main, the code coverage will be uploaded to `https://app.codecov.io/github/<org_name>/<repo_name>`, and the badge on the repository updated.

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
with:
2626
runs-on: ${{ matrix.runs-on }}
2727
python-version: ${{ matrix.python-version }}
28-
secrets:
29-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3028
{% endraw %}{% if docker %}{% raw %}
3129
container:
3230
needs: test

0 commit comments

Comments
 (0)