...
1name: Lint
2on:
3 push:
4 branches:
5 - master
6 pull_request:
7 types: [ opened, synchronize ]
8# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
9# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
10concurrency:
11 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12 cancel-in-progress: true
13jobs:
14 golangci-lint:
15 strategy:
16 matrix:
17 go: ["1.21", "1.22"]
18 runs-on: ubuntu-latest
19 steps:
20 - uses: actions/checkout@v4
21 - uses: actions/setup-go@v5
22 with:
23 go-version: ${{ matrix.go }}
24 - name: golangci-lint
25 uses: golangci/golangci-lint-action@v4.0.0
26 with:
27 version: latest
28 # skip cache because of flaky behaviors
29 skip-build-cache: true
30 skip-pkg-cache: true
31 args: '--timeout 5m'
View as plain text