Debian Codegraph @

.github/workflows/go.yaml

raw
1 name: Go
2
3 on:
4 push:
5 branches: ['*', '*/*']
6 tags: ['v*']
7 pull_request:
8 branches: ['*']
9
10 permissions:
11 contents: read
12
13 jobs:
14 lint:
15 name: lint
16 runs-on: ubuntu-latest
17 steps:
18 - uses: actions/checkout@v4
19 - uses: actions/setup-go@v5
20 with:
21 go-version: stable
22 - name: golangci-lint
23 uses: golangci/golangci-lint-action@v6
24 with:
25 version: v1.64
26 test:
27 name: test
28 strategy:
29 matrix:
30 go: ["1.23.x", "1.24.x"]
31 runs-on: ubuntu-latest
32 steps:
33 - name: Setup Go
34 with:
35 go-version: ${{ matrix.go }}
36 uses: actions/setup-go@v2
37
38 - uses: actions/checkout@v2
39
40 - name: Test
41 run: make cover
42
43 - name: Upload coverage to codecov.io
44 uses: codecov/codecov-action@v3
45
46 test-correctness-nopool:
47 name: test-correctness-nopool
48 strategy:
49 matrix:
50 go: ["1.23.x", "1.24.x"]
51 runs-on: ubuntu-latest
52 steps:
53 - name: Setup Go
54 with:
55 go-version: ${{ matrix.go }}
56 uses: actions/setup-go@v2
57
58 - uses: actions/checkout@v2
59
60 - name: Test
61 run: go test ./... -run=TestCacheCorrectness_NoPool -count=1 -race
62
63 test-correctness-pool:
64 name: test-correctness-pool
65 strategy:
66 matrix:
67 go: ["1.23.x", "1.24.x"]
68 runs-on: ubuntu-latest
69 steps:
70 - name: Setup Go
71 with:
72 go-version: ${{ matrix.go }}
73 uses: actions/setup-go@v2
74
75 - uses: actions/checkout@v2
76
77 - name: Test
78 run: go test ./... -run=TestCacheCorrectness_EntryPool -count=1
79
80 test-os:
81 name: test-os
82 strategy:
83 matrix:
84 go: ["1.23.x", "1.24.x"]
85 os: [macos-latest, windows-latest, ubuntu-latest]
86 runs-on: ${{ matrix.os }}
87 steps:
88 - name: Setup Go
89 with:
90 go-version: ${{ matrix.go }}
91 uses: actions/setup-go@v2
92
93 - uses: actions/checkout@v2
94
95 - name: Test
96 run: |
97 go test ./... -run=TestPersist_OS