@@ -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' }}
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