blob: aea7c28dfc787ccba8f9018385293f715ed1592d [file] [log] [blame]
Earl Lee2e463fb2025-04-17 11:22:22 -07001name: go_tests
2on:
3 workflow_call:
4 push:
5 branches-ignore:
6 - "queue-main-**"
7 pull_request:
8jobs:
9 test:
Sean McCullough9abbf922025-04-18 13:17:38 -070010 runs-on: "ubuntu-latest"
Earl Lee2e463fb2025-04-17 11:22:22 -070011 steps:
12 - uses: actions/checkout@master
13
14 - uses: actions/setup-go@v5
15 with:
16 go-version-file: "go.mod"
17 cache: true
18
19 - name: Cache Go 1.24.2
20 uses: actions/cache@v4
21 with:
22 path: |
23 ~/.cache/go-build
24 key: ${{ runner.os }}-go1.24.2-${{ hashFiles('**/go.sum') }}
25 restore-keys: |
26 ${{ runner.os }}-go1.24.2-
27
28 - name: Install tools
29 run: |
30 go install golang.org/x/tools/gopls@latest
31
32 - name: Go generate
33 run: |
34 go generate ./...
35
36 - name: Run tests
37 run: |
38 go test -v ./...
39 go test -v -race ./...