-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (33 loc) · 1001 Bytes
/
test.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
name: Terraform Provider Testing
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go: [ "1.22" "1.23" ]
env:
GOPATH: /home/runner/work/terraform-provider-jetstream
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{matrix.go}}
- name: Lint
shell: bash
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest
PATH=$PATH:$GOPATH/bin
GO_LIST=$(go list ./...)
$(exit $(go fmt $GO_LIST | wc -l))
go vet -composites=false $GO_LIST
find . -type f -name "*.go" | xargs misspell -error -locale US
staticcheck -f stylish $GO_LIST
- name: Run tests
shell: bash
run: |
set -e
TF_ACC=1 go test -v --failfast -p=1 ./...