-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (37 loc) · 1.1 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ '1.19', '1.18' ]
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go Build
run: go build -gcflags="-e" ./cmd/spinmd
env:
CGO_ENABLED: 0
- name: Go Test
run: go test -v ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --fast