Skip to content

Commit

Permalink
Use codecov upload token
Browse files Browse the repository at this point in the history
Refs codecov/codecov-action#837.
  • Loading branch information
AlekSi committed Oct 3, 2022
1 parent d35df61 commit 92717ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ env:
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org

# Temporary workaround for https://github.com/codecov/codecov-action/issues/837
CODECOV_TOKEN: 1e257034-a484-4a13-abdf-009e769b909b
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
short-test:
name: Short test
Expand Down Expand Up @@ -91,11 +95,12 @@ jobs:
run: bin/task test-unit

# The token is not required but should make uploads more stable.
# See https://github.com/codecov/codecov-action/issues/837.
# If secrets are unavailable (for example, for a pull request from a fork), it fallbacks to the tokenless uploads.
- name: Upload coverage information
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ env.CODECOV_TOKEN }}
files: ./cover.txt
flags: unit
fail_ci_if_error: true
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ env:
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org

# Temporary workaround for https://github.com/codecov/codecov-action/issues/837
CODECOV_TOKEN: 1e257034-a484-4a13-abdf-009e769b909b
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
test:
name: Test ${{ matrix.name }}
Expand Down Expand Up @@ -66,11 +70,12 @@ jobs:
run: bin/task test-integration-${{ matrix.task }}

# The token is not required but should make uploads more stable.
# See https://github.com/codecov/codecov-action/issues/837.
# If secrets are unavailable (for example, for a pull request from a fork), it fallbacks to the tokenless uploads.
- name: Upload coverage information
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ env.CODECOV_TOKEN }}
files: ./integration/integration-${{ matrix.task }}.txt
flags: integration,${{ matrix.task }}
fail_ci_if_error: true
Expand Down

0 comments on commit 92717ef

Please sign in to comment.