1919 push :
2020 branches :
2121 - ' main'
22- - ' updates'
2322 pull_request :
2423
25- permissions : read-all
24+ permissions : {}
2625
2726jobs :
2827 unit-tests :
3635
3736 steps :
3837 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+ with :
39+ persist-credentials : false
3940 # https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
40- - uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
41+ - uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4142 with :
4243 # In order:
4344 # * Module download cache
5051 key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5152 restore-keys : |
5253 ${{ runner.os }}-go-
53- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3 .0
54+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5 .0
5455 with :
5556 go-version-file : ' ./go.mod'
5657 check-latest : true
5960 - name : Run Go tests
6061 run : go test -covermode atomic -coverprofile coverage.txt $(go list ./... | grep -v third_party/)
6162 - name : Upload Coverage Report
62- uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
63+ uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
6364 with :
6465 env_vars : OS
6566 - name : Run Go tests w/ `-race`
6970 license-check :
7071 name : license boilerplate check
7172 runs-on : ubuntu-latest
73+ permissions :
74+ contents : read
7275 steps :
7376 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
77+ with :
78+ persist-credentials : false
79+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
7580 with :
7681 go-version-file : ' ./go.mod'
7782 check-latest : true
@@ -85,15 +90,37 @@ jobs:
8590 golangci :
8691 name : lint
8792 runs-on : ubuntu-latest
93+ permissions :
94+ contents : read
8895 steps :
8996 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90- - uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
97+ with :
98+ persist-credentials : false
99+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
91100 with :
92101 go-version-file : ' ./go.mod'
93102 check-latest : true
94103
95104 - name : golangci-lint
96- uses : golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2 .0
105+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0 .0
97106 with :
98- version : v1.61
107+ version : v2.1
99108 args : --timeout=10m --verbose
109+
110+ gen-check :
111+ name : Check generated code
112+ runs-on : ubuntu-latest
113+ permissions :
114+ contents : read
115+ steps :
116+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117+ with :
118+ persist-credentials : false
119+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
120+ with :
121+ go-version-file : ' ./go.mod'
122+ check-latest : true
123+ - name : Verify generated code is unchanged
124+ run : |
125+ make gen
126+ git diff --exit-code
0 commit comments