-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (53 loc) · 1.26 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
55
56
57
name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
GOPROXY: https://proxy.golang.org/
jobs:
copywrite:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout Repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install copywrite
uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- name: Validate Header Compliance
run: copywrite headers --plan
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- '1.19'
- '1.20'
steps:
-
name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go }}
-
name: Go mod download
run: go mod download -x
-
name: Go mod verify
run: go mod verify
-
name: Run tests
run: go test -v ./...