@@ -5,10 +5,10 @@ concurrency:
5
5
on :
6
6
push :
7
7
branches :
8
- - master
8
+ - master
9
9
pull_request :
10
10
branches :
11
- - master
11
+ - master
12
12
13
13
name : tests
14
14
env :
@@ -19,6 +19,9 @@ permissions:
19
19
20
20
jobs :
21
21
test :
22
+ permissions :
23
+ contents : read
24
+ id-token : write
22
25
defaults :
23
26
run :
24
27
shell : bash
@@ -39,38 +42,40 @@ jobs:
39
42
runs-on : ${{ matrix.platform }}
40
43
41
44
steps :
42
- - uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
43
- with :
44
- go-version : ${{ matrix.go-version }}
45
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45
+ - uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
46
+ with :
47
+ go-version : ${{ matrix.go-version }}
48
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46
49
47
- # Get values for cache paths to be used in later steps
48
- - id : cache-paths
49
- run : |
50
- echo "go-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
51
- echo "go-mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
50
+ # Get values for cache paths to be used in later steps
51
+ - id : cache-paths
52
+ run : |
53
+ echo "go-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
54
+ echo "go-mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
52
55
53
- - name : Cache go modules
54
- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
55
- with :
56
- path : |
57
- ${{ steps.cache-paths.outputs.go-cache }}
58
- ${{ steps.cache-paths.outputs.go-mod-cache }}
59
- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60
- restore-keys : ${{ runner.os }}-go-
56
+ - name : Cache go modules
57
+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
58
+ with :
59
+ path : |
60
+ ${{ steps.cache-paths.outputs.go-cache }}
61
+ ${{ steps.cache-paths.outputs.go-mod-cache }}
62
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
63
+ restore-keys : ${{ runner.os }}-go-
61
64
62
- - name : Run go test
63
- run : |
64
- if [ -n "${{ matrix.update-coverage }}" ]; then
65
- script/test.sh -race -covermode atomic -coverprofile coverage.txt ./...
66
- exit
67
- fi
68
- script/test.sh -race -covermode atomic ./...
65
+ - name : Run go test
66
+ run : |
67
+ if [ -n "${{ matrix.update-coverage }}" ]; then
68
+ script/test.sh -race -covermode atomic -coverprofile coverage.txt ./...
69
+ exit
70
+ fi
71
+ script/test.sh -race -covermode atomic ./...
69
72
70
- - name : Ensure integration tests build
71
- # don't actually run tests since they hit live GitHub API
72
- run : go test -v -tags=integration -run=^$ ./test/integration
73
+ - name : Ensure integration tests build
74
+ # don't actually run tests since they hit live GitHub API
75
+ run : go test -v -tags=integration -run=^$ ./test/integration
73
76
74
- - name : Upload coverage to Codecov
75
- if : ${{ matrix.update-coverage }}
76
- uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
77
+ - name : Upload coverage to Codecov
78
+ if : ${{ matrix.update-coverage }}
79
+ uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
80
+ with :
81
+ use_oidc : true
0 commit comments