-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (50 loc) · 1.31 KB
/
ci.yaml
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
50
51
52
53
54
55
name: CI
on:
push:
branches:
- master
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.16.x, 1.17.x]
runs-on: ${{ matrix.os }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
# Note: this is @v3.2.0.
uses: golangci/golangci-lint-action@537aa1903e5d359d0b27dbc19ddd22c5087f3fbc
with:
version: v1.43
args: --timeout=5m
-
name: Tests
run: |
go mod tidy
go test -v ./...
go test -cpu=1 -short -race ./...
go test -cpu=4 -short -race ./...
go-releaser-check:
needs: build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.16.x
- name: Checkout code
uses: actions/checkout@v3
- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v1.2.5 sh -s -- check
- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v1.2.5 sh -s -- --snapshot --skip-publish --rm-dist