Skip to content

Commit 5fba4e4

Browse files
authored
ci: add codecov token (#810)
Just use the codecov token since it seems to work even when empty.
1 parent 850c203 commit 5fba4e4

File tree

2 files changed

+8
-42
lines changed

2 files changed

+8
-42
lines changed

.github/workflows/test-and-tag.yml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
run: |
2727
go test ./... -race -covermode=atomic -coverprofile=coverage.out
2828
29-
- name: Upload coverage artifact
30-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
29+
- name: Upload coverage to Codecov
30+
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
3131
with:
32-
name: coverage
33-
path: coverage.out
32+
files: coverage.out
33+
token: ${{ secrets.CODECOV_TOKEN }}
3434

3535
# This builds the binary and starts it. If it does not exit within 3 seconds, consider it
3636
# successful
@@ -41,43 +41,6 @@ jobs:
4141
make build
4242
API_URL=https://example.com/api timeout 3 ./backend || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
4343
44-
codecov-upstream:
45-
if: github.repository == 'envelope-zero/backend'
46-
needs: test
47-
runs-on: ubuntu-latest
48-
steps:
49-
- name: Checkout
50-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
51-
52-
- name: Download coverage artifacts
53-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
54-
with:
55-
name: coverage
56-
57-
- name: Upload coverage to Codecov
58-
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
59-
with:
60-
files: coverage.out
61-
token: ${{ secrets.CODECOV_TOKEN }}
62-
63-
codecov-fork:
64-
if: github.repository != 'envelope-zero/backend'
65-
needs: test
66-
runs-on: ubuntu-latest
67-
steps:
68-
- name: Checkout
69-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
70-
71-
- name: Download coverage artifacts
72-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
73-
with:
74-
name: coverage
75-
76-
- name: Upload coverage to Codecov
77-
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
78-
with:
79-
files: coverage.out
80-
8144
tag:
8245
runs-on: ubuntu-latest
8346
needs: test

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"gopls": {
44
"formatting.gofumpt": true
55
},
6-
"editor.tabSize": 4
6+
"editor.tabSize": 4,
7+
"[yaml]": {
8+
"editor.tabSize": 2
9+
}
710
}

0 commit comments

Comments
 (0)