Skip to content

Commit aaef0ff

Browse files
authored
chore: improve ci (#1271)
1 parent 533d762 commit aaef0ff

2 files changed

Lines changed: 9 additions & 24 deletions

File tree

.codecov.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
codecov:
2-
# across
3-
notify:
4-
# Do not notify until at least this number of reports have been uploaded
5-
# from the CI pipeline. We normally have more than that number, but 6
6-
# should be enough to get a first notification.
7-
after_n_builds: 6
81
coverage:
92
status:
103
project:

.github/workflows/test.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,11 @@ jobs:
2626
# this step for the whole matrix.
2727
RUN_RACE_TESTS: ${{ github.event_name != 'pull_request' || (matrix.go == '1.26' && matrix.os == 'ubuntu') }}
2828
steps:
29+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2930
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
3031
with:
3132
go-version: ${{ matrix.go }}
32-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
33-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
34-
with:
35-
# In order:
36-
# * Module download cache
37-
# * Build cache (Linux)
38-
# * Build cache (Mac)
39-
# * Build cache (Windows)
40-
path: |
41-
~/go/pkg/mod
42-
~/.cache/go-build
43-
~/Library/Caches/go-build
44-
%LocalAppData%\go-build
45-
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
46-
restore-keys: |
47-
${{ runner.os }}-go-${{ matrix.go }}-
33+
cache-dependency-path: '**/go.sum'
4834
- name: Tidy
4935
run: make mod-tidy
5036
if: ${{ matrix.go == '1.26' }}
@@ -53,8 +39,14 @@ jobs:
5339
- name: Vet
5440
run: make vet
5541
- name: Test${{ env.RUN_RACE_TESTS == 'true' && ' (with race detection)' || '' }}
56-
run: ${{ env.RUN_RACE_TESTS == 'true' && 'make test-race-coverage' || 'make test-coverage' }}
42+
run: |
43+
if [ "${{ matrix.os }}" = "ubuntu" ] && [ "${{ matrix.go }}" = "1.26" ]; then
44+
${{ env.RUN_RACE_TESTS == 'true' && 'make test-race-coverage' || 'make test-coverage' }}
45+
else
46+
${{ env.RUN_RACE_TESTS == 'true' && 'make test-race' || 'make test' }}
47+
fi
5748
- name: Upload coverage to Codecov
49+
if: ${{ matrix.os == 'ubuntu' && matrix.go == '1.26' }}
5850
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # pin@v6.0.0
5951
with:
6052
directory: .coverage

0 commit comments

Comments
 (0)