Debian Codegraph @

.github/workflows/test.yaml

raw
1 name: Tests
2 on:
3 push:
4 branches: [ "main" ]
5 pull_request:
6 branches: [ "main" ]
7 jobs:
8 tests:
9 runs-on: ubuntu-24.04
10 strategy:
11 matrix:
12 goversion: [1.19, 1.18]
13 steps:
14 - name: Set up Go
15 uses: actions/setup-go@v2
16 with:
17 go-version: ${{ matrix.goversion }}
18 - name: Checkout code
19 uses: actions/checkout@v2
20 - name: Cache Go dependencies
21 id: cache-go-modules
22 uses: actions/cache@v4
23 with:
24 path: ~/go/pkg/mod
25 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
26 restore-keys: |
27 ${{ runner.os }}-go-
28 - name: Build ARM
29 run: GOARCH=arm go build -v -mod=readonly ./...
30 - name: Build ARM64
31 run: GOARCH=arm64 go build -v -mod=readonly ./...
32 - name: Build
33 run: go build -v -mod=readonly ./...
34 - name: Test
35 run: go test -v -mod=readonly ./...
36 - name: Build 386
37 run: GOARCH=386 go build -v -mod=readonly ./...
38 - name: Test 386
39 run: GOARCH=386 go test -v -mod=readonly ./...
40 - name: Go vet
41 run: go vet ./...