generated from davidji99/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (36 loc) · 1.12 KB
/
tests.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
name: tests
on: [pull_request, push]
env:
GO111MODULE: on
jobs:
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3.6.0
- name: Cache go modules
uses: actions/cache@v3.3.1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Run make fmt
if: runner.os != 'Windows'
run: |
make fmt
git diff --exit-code; code=$?; git checkout -- .; (exit $code)
- name: Run go vet
run: go vet ./...
- name: Ensure generating accessors produces a zero diff
shell: bash
run: cd api && go run gen-accessors.go && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
- name: Run make build
run: make build
- name: Run make test
run: make testacc TEST="./split/" TESTARGS='-run=TestProvider'