Debian Codegraph @

.github/workflows/build.yml

raw symbols SCIP
1 on: [push, pull_request, workflow_dispatch]
2 name: Build
3 env:
4 GO111MODULE: on
5 jobs:
6 test:
7 strategy:
8 matrix:
9 go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x]
10 os: [ubuntu-latest, macos-latest]
11 runs-on: ${{ matrix.os }}
12 steps:
13 - name: Install Go
14 uses: actions/setup-go@v5
15 with:
16 go-version: stable
17 - name: Checkout code
18 uses: actions/checkout@v4
19 - name: Test
20 run: go test ./...
21
22 test-cache:
23 runs-on: ubuntu-latest
24 steps:
25 - name: Install Go
26 uses: actions/setup-go@v5
27 with:
28 go-version: 1.21.x
29 - name: Checkout code
30 uses: actions/checkout@v4
31 - uses: actions/cache@v4
32 with:
33 path: |
34 ~/go/pkg/mod # Module download cache
35 ~/.cache/go-build # Build cache (Linux)
36 ~/Library/Caches/go-build # Build cache (Mac)
37 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
38 restore-keys: |
39 ${{ runner.os }}-go-
40 - name: Test
41 run: go test ./...