Debian Codegraph @

.github/workflows/go.yml

raw
1 name: Go
2
3 on:
4 push:
5 branches: [ '**' ]
6 pull_request:
7 branches: [ '**' ]
8
9 jobs:
10 build:
11 strategy:
12 fail-fast: false
13 matrix:
14 GO_VERSION:
15 - "1.24.x"
16 - "1.25.x"
17 runs-on: ubuntu-latest
18 steps:
19 - uses: actions/checkout@v6
20 with:
21 persist-credentials: false
22
23 - name: Set up Go ${{ matrix.GO_VERSION }}
24 uses: actions/setup-go@v6
25 with:
26 go-version: "${{ matrix.GO_VERSION }}"
27
28 - name: Build
29 run: go build -v ./...
30
31 - name: Test
32 run: go test -v ./...
33
34 govulncheck:
35 strategy:
36 matrix:
37 GO_VERSION:
38 # We only need to test vulns on one version
39 - "1.25.x"
40 runs-on: ubuntu-latest
41 steps:
42 - uses: actions/checkout@v6
43 with:
44 persist-credentials: false
45
46 - name: Set up Go ${{ matrix.GO_VERSION }}
47 uses: actions/setup-go@v6
48 with:
49 # When Go produces a security release, we want govulncheck to run
50 # against the most recently released Go version.
51 check-latest: true
52 go-version: "${{ matrix.GO_VERSION }}"
53
54 - name: Run govulncheck
55 run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...