-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (55 loc) · 1.42 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: Run CI Tests
on:
push:
branches:
- main
paths-ignore:
- README.md
- .gitignore
pull_request:
paths-ignore:
- README.md
- .gitignore
jobs:
run-copywrite:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: hashicorp/setup-copywrite@v1.1.2
- name: verify copyright
run: |
copywrite headers --plan
run-lint:
timeout-minutes: 10
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: hashicorp/setup-golang@v2
with:
version-file: go.mod
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.54.0
skip-cache: true
run-tests:
timeout-minutes: 10
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: hashicorp/setup-golang@v2
with:
version-file: go.mod
- name: Run Go Vet
run: |
go vet ./...
- name: Run Go Fmt
run: |
files=$(go fmt ./...)
if [ -n "$files" ]; then
echo "Please run gofmt on these files ..."
echo "$files"
exit 1
fi
- name: Run Go Test
run: |
go test -race -v ./...