From 224c2129eea6a800609e311d95dca1394abc18f2 Mon Sep 17 00:00:00 2001 From: Jean Elsner Date: Thu, 8 Feb 2024 17:11:09 +0100 Subject: [PATCH 1/4] fix: add codecov token to github action v4 of the codecov action requires the token to be specified as a parameter --- {{cookiecutter.project_name}}/.github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index 6d2862cb..fad1a66d 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -75,3 +75,5 @@ jobs: - name: Upload coverage report uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} From d4eb91f812523ae29b75dc643b920b84b285fbd4 Mon Sep 17 00:00:00 2001 From: Jean Elsner Date: Thu, 8 Feb 2024 17:24:26 +0100 Subject: [PATCH 2/4] Update ci.yml --- {{cookiecutter.project_name}}/.github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index fad1a66d..9efc5f3c 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -76,4 +76,4 @@ jobs: - name: Upload coverage report uses: codecov/codecov-action@v4.0.1 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %} From 4380b72ac12169d18d1d2014a4a74b5d3e3938a8 Mon Sep 17 00:00:00 2001 From: Jean Elsner Date: Thu, 8 Feb 2024 17:30:19 +0100 Subject: [PATCH 3/4] Update ci.yml --- {{cookiecutter.project_name}}/.github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/.github/workflows/ci.yml b/{{cookiecutter.project_name}}/.github/workflows/ci.yml index 9efc5f3c..6d4569b5 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/ci.yml @@ -76,4 +76,4 @@ jobs: - name: Upload coverage report uses: codecov/codecov-action@v4.0.1 with: - token: token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %} + token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %} From 2bd5b32e2b58c7bae27624559b87f5a8fdf1d203 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 12 Feb 2024 16:06:19 -0500 Subject: [PATCH 4/4] docs: add mention of token for codecov Signed-off-by: Henry Schreiner --- docs/pages/guides/coverage.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/pages/guides/coverage.md b/docs/pages/guides/coverage.md index b7f9d3fe..8e293771 100644 --- a/docs/pages/guides/coverage.md +++ b/docs/pages/guides/coverage.md @@ -87,14 +87,21 @@ uploading coverage reports easy for users. A minimal working example for uploading coverage reports through your workflow, which should be more than enough for a simple testing suite, can be written as follows: +{% raw %} + ```yaml - name: Upload coverage report uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} ``` +{% endraw %} + The lines above should be added after the step that runs your tests with the `--cov` option. See the [docs](https://github.com/codecov/codecov-action#usage) -for all the optional options. +for all the optional options. You'll need to specify a `CODECOV_TOKEN` secret, +as well. ### Using codecov.yml