Debian Codegraph @

.github/workflows/go.yaml

raw symbols SCIP
1 name: go
2
3 on:
4 push:
5 branches:
6 - main
7 tags:
8 - 'v*'
9 pull_request:
10
11 jobs:
12 lint:
13 runs-on: ubuntu-latest
14 name: Linters (Static Analysis) for Go
15 steps:
16 - name: Checkout code into the Go module directory.
17 uses: actions/checkout@v5
18
19 - name: Install Go
20 uses: actions/setup-go@v6
21 with:
22 go-version: 1.25.x
23
24 - uses: actions/cache@v4
25 with:
26 path: ~/go/pkg/mod
27 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28
29 - name: Linting & vetting.
30 env:
31 GOBIN: /tmp/.bin
32 run: make lint
33 tests:
34 runs-on: ${{ matrix.platform }}
35 strategy:
36 fail-fast: false
37 matrix:
38 go: ['1.24.x', '1.25.x']
39 platform: [ubuntu-latest, macos-latest]
40
41 name: Unit tests on Go ${{ matrix.go }} ${{ matrix.platform }}
42 steps:
43 - name: Checkout code into the Go module directory.
44 uses: actions/checkout@v5
45
46 - name: Install Go
47 uses: actions/setup-go@v6
48 with:
49 go-version: ${{ matrix.go }}
50
51 - uses: actions/cache@v3
52 with:
53 path: ~/go/pkg/mod
54 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
55
56 - name: Run unit tests.
57 env:
58 GOBIN: /tmp/.bin
59 run: make test