-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.33 KB
/
test.yml
File metadata and controls
66 lines (55 loc) · 1.33 KB
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
58
59
60
61
62
63
64
65
66
name: tests
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
go:
name: Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26"
cache: true
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
- name: go vet
run: go vet -mod=vendor ./...
- name: go build
run: go build -mod=vendor ./...
- name: go test
run: go test -mod=vendor -race -count=1 -timeout=120s ./...
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.26"
cache: true
- uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
args: --timeout=5m
terraform-fmt:
name: terraform fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: hashicorp/setup-terraform@v4
with:
terraform_version: "1.9.8"
- name: terraform fmt -check
run: terraform fmt -check -recursive examples/