6
6
pull_request :
7
7
8
8
jobs :
9
- test :
9
+ unit :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- uses : actions/checkout@v4
@@ -21,31 +21,54 @@ jobs:
21
21
with :
22
22
flags : unit
23
23
24
- integration :
24
+ e2e :
25
25
runs-on : ubuntu-latest
26
26
27
27
permissions :
28
28
id-token : write
29
29
30
+ concurrency :
31
+ group : ${{ github.workflow }}-${{ github.ref }}-${{ matrix.tool }}-${{ matrix.version }}
32
+ cancel-in-progress : true
33
+
30
34
strategy :
31
- matrix :
32
- terraform : [v1.6.x, v1.7.x]
33
35
fail-fast : false
36
+ matrix :
37
+ include :
38
+ - tool : opentofu
39
+ version : v1.6.x
40
+ - tool : terraform
41
+ version : v1.6.x
42
+ - tool : terraform
43
+ version : v1.7.x
34
44
35
45
steps :
36
46
- uses : actions/checkout@v4
37
47
38
- - uses : hashicorp/setup-terraform@v3
48
+ - if : matrix.tool == 'terraform'
49
+ uses : hashicorp/setup-terraform@v3
39
50
with :
40
- terraform_version : ${{ matrix.terraform }}
51
+ terraform_version : ${{ matrix.version }}
41
52
terraform_wrapper : false
42
53
54
+ - if : matrix.tool == 'opentofu'
55
+ uses : opentofu/setup-opentofu@v1
56
+ with :
57
+ tofu_version : ${{ matrix.version }}
58
+ tofu_wrapper : false
59
+
43
60
- uses : actions/setup-go@v5
44
61
with :
45
62
go-version-file : go.mod
46
63
47
64
- uses : hetznercloud/tps-action@main
48
65
66
+ - if : matrix.tool == 'opentofu'
67
+ run : |
68
+ echo TF_ACC_TERRAFORM_PATH="$(which tofu)" >> $GITHUB_ENV
69
+ echo TF_ACC_PROVIDER_NAMESPACE="hashicorp" >> $GITHUB_ENV
70
+ echo TF_ACC_PROVIDER_HOST="registry.opentofu.org" >> $GITHUB_ENV
71
+
49
72
- run : make testacc TESTARGS="-coverprofile=coverage.txt -coverpkg=./..."
50
73
env :
51
74
# Domain must be available in the account running the tests. This domain is
62
85
- uses : actions/upload-artifact@v4
63
86
if : always()
64
87
with :
65
- name : debug-logs-${{ matrix.terraform }}
88
+ name : debug-logs-${{ matrix.tool }}-${{ matrix.version }}
66
89
path : internal/e2etests/**/*.log
0 commit comments