-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (53 loc) · 1.38 KB
/
ci.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
50
51
52
53
54
name: CI Workflow
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go-version: [1.20.x]
platform: [ubuntu-latest, macos-latest]
name: build
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- run: go build
lint:
strategy:
matrix:
go-version: [1.20.x]
platform: [ubuntu-latest]
name: lint
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- run: |
go install golang.org/x/lint/golint@v0.0.0-20201208152925-83fdc39ff7b5
golint -set_exit_status ./...
go vet ./...
tests:
strategy:
matrix:
go-version: [1.20.x]
platform: [ubuntu-latest, macos-latest]
name: tests
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- run: |
go install github.com/mfridman/tparse@latest
go test -v -race -cover -json ./... | $(go env GOPATH)/bin/tparse -all