Debian Codegraph @

.github/workflows/go.yml

raw
1 name: Go
2
3 on:
4 push:
5 branches: [ main ]
6 pull_request:
7 branches: [ main ]
8
9
10 jobs:
11 build:
12 strategy:
13 matrix:
14 go-version: [1.22.x, 1.23.x, 1.24.x]
15 os: [ubuntu-latest, macos-latest, windows-latest]
16 env:
17 CGO_ENABLED: 0
18 runs-on: ${{ matrix.os }}
19 steps:
20 - name: Set up Go
21 uses: actions/setup-go@v2
22 with:
23 go-version: ${{ matrix.go-version }}
24
25 - name: Checkout code
26 uses: actions/checkout@v2
27
28 - name: Vet
29 run: go vet ./...
30
31 - name: Test
32 run: go test
33
34 - name: Test Noasm
35 run: go test -tags=noasm
36
37 - name: Test Race
38 env:
39 CGO_ENABLED: 1
40 run: go test -cpu="1,4" -short -race -v .
41
42 build-special:
43 env:
44 CGO_ENABLED: 0
45 runs-on: ubuntu-latest
46 steps:
47 - name: Set up Go
48 uses: actions/setup-go@v2
49 with:
50 go-version: 1.24.x
51
52 - name: Checkout code
53 uses: actions/checkout@v2
54
55 - name: fmt
56 run: diff <(gofmt -d .) <(printf "")
57
58 - name: Test 386
59 run: GOOS=linux GOARCH=386 go test -short ./...