-
-
Notifications
You must be signed in to change notification settings - Fork 90
49 lines (43 loc) · 1.13 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "Go"
on:
push:
branches:
- master
pull_request:
jobs:
ci:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest"]
go: ["1.19", "1.20"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go }}
uses: WillAbides/[email protected]
with:
go-version: ${{ matrix.go }}
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache Go build cache
uses: actions/cache@v3
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ matrix.go }}
restore-keys: |
${{ runner.os }}-go-build-
- name: Run go vet
run: "go vet ./..."
- name: Run Staticcheck
uses: dominikh/[email protected]
with:
version: "2023.1.1"
install-go: false
cache-key: ${{ matrix.go }}