-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.06 KB
/
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
name: Terraform Provider Tests
on: [push]
jobs:
acceptance:
name: Acceptance Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: "1.5.*"
terraform_wrapper: false
- run: make testacc
env:
HUMANITEC_ORG: ${{ secrets.HUMANITEC_ORG_ID }} # Reusing env variable on GitHub Actions
HUMANITEC_TOKEN: ${{ secrets.HUMANITEC_TOKEN }}
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- name: Tidy go.mod file
run: go mod tidy
- name: Generate docs
run: go generate ./...
- name: Check git diff is clean (all files generated should be committed)
run: git diff --exit-code
- name: Run tests
run: go test -v -cover ./...