Skip to content

Commit 7bea442

Browse files
committed
Resolve conflicts in test.yml (#112)
1 parent 427de1c commit 7bea442

File tree

1 file changed

+34
-46
lines changed

1 file changed

+34
-46
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: Test
2-
1+
name: Tests
32
on:
43
pull_request:
54
branches: [ main ]
@@ -13,76 +12,65 @@ on:
1312
- 'README.md'
1413
- 'CHANGELOG.md'
1514
- 'website/*'
16-
1715
jobs:
1816
build:
1917
name: Build
2018
runs-on: ubuntu-latest
2119
timeout-minutes: 5
2220
steps:
2321

24-
- name: Set up Go
25-
uses: actions/setup-go@v3
26-
with:
27-
go-version: '1.18'
28-
id: go
29-
3022
- name: Check out code into the Go module directory
31-
uses: actions/checkout@v3
23+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
3224

33-
- name: Run linters
34-
uses: golangci/golangci-lint-action@v3
25+
- name: Set up Go
26+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
3527
with:
36-
version: latest
28+
go-version-file: 'go.mod'
29+
id: go
3730

38-
- name: Generate
39-
run: make generate
31+
- name: Go fmt
32+
run: |
33+
make fmt
4034
41-
- name: Confirm no diff
35+
- name: Go vet
4236
run: |
43-
git diff --compact-summary --exit-code || \
44-
(echo "*** Unexpected differences after code generation. Run 'make generate' and commit."; exit 1)
37+
make vet
4538
4639
- name: Build
47-
run: make build
40+
run: |
41+
go build -v .
42+
4843

44+
# run acceptance tests in a matrix with Terraform core versions
4945
test:
50-
name: 'Acc. Tests (OS: ${{ matrix.os }} / TF: ${{ matrix.terraform }})'
46+
name: Matrix Test
5147
needs: build
5248
runs-on: ${{ matrix.os }}
5349
timeout-minutes: 15
5450
strategy:
5551
fail-fast: false
5652
matrix:
57-
os:
58-
- macos-latest
59-
- windows-latest
60-
- ubuntu-latest
53+
os: [macos-latest, windows-latest, ubuntu-latest]
6154
terraform:
62-
- '0.12.*'
63-
- '0.13.*'
64-
- '0.14.*'
65-
- '0.15.*'
66-
- '1.0.*'
67-
- '1.1.*'
68-
- '1.2.*'
69-
- '1.3.*'
55+
- '0.12.31'
56+
- '0.13.7'
57+
- '0.14.11'
58+
- '0.15.1'
7059
steps:
7160

72-
- name: Setup Go
73-
uses: actions/setup-go@v3
74-
with:
75-
go-version: '1.18'
76-
check-latest: true
77-
78-
- name: Check out code
79-
uses: actions/checkout@v3
61+
- name: Check out code into the Go module directory
62+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
8063

81-
- name: Setup Terraform ${{ matrix.terraform }}
82-
uses: hashicorp/setup-terraform@v2
64+
- name: Set up Go
65+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
8366
with:
84-
terraform_version: ${{ matrix.terraform }}
85-
terraform_wrapper: false
67+
go-version-file: 'go.mod'
68+
id: go
8669

87-
- name: Run acceptance test
88-
run: make testacc
70+
- name: TF acceptance tests
71+
timeout-minutes: 10
72+
env:
73+
TF_ACC: "1"
74+
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
75+
run: |
76+
go test -v -cover ./internal/provider/

0 commit comments

Comments
 (0)