4040 with :
4141 version : latest
4242
43- test-upcloud :
44- name : Acceptance Tests (UpCloud)
43+ test :
44+ name : Acceptance Tests
45+ strategy :
46+ matrix :
47+ target :
48+ - UpCloud
49+ - Minio
50+ - moto
51+ cli :
52+ - terraform
53+ - tofu
4554 needs : build
4655 runs-on : ubuntu-latest
4756 timeout-minutes : 15
5463 - uses : hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
5564 with :
5665 terraform_wrapper : false
66+ if : matrix.cli == 'terraform'
67+ - uses : opentofu/setup-opentofu@592200bd4b9bbf4772ace78f887668b1aee8f716 # v1.0.5
68+ if : matrix.cli == 'tofu'
69+ - name : Set TF_ACC_* environment for OpenTofu
70+ run : |
71+ echo "TF_ACC_TERRAFORM_PATH=$(which tofu)" >> "$GITHUB_ENV"
72+ echo "TF_ACC_PROVIDER_NAMESPACE=hashicorp" >> "$GITHUB_ENV"
73+ echo "TF_ACC_PROVIDER_HOST=registry.opentofu.org" >> "$GITHUB_ENV"
74+ if : matrix.cli == 'tofu'
5775 - run : go mod download
58- - env :
76+ - name : Test against UpCloud Managed Object Storage
77+ env :
5978 TF_ACC : " 1"
6079 TEST_TARGET : UpCloud
6180 OBJSTO_ACCESS_KEY : ${{ secrets.UPCLOUD_ACCESS_KEY }}
6483 OBJSTO_REGION : ${{ secrets.UPCLOUD_REGION }}
6584 run : go test -v -cover ./internal/provider/
6685 timeout-minutes : 10
67-
68- test-minio :
69- name : Acceptance Tests (Minio)
70- needs : build
71- runs-on : ubuntu-latest
72- timeout-minutes : 15
73- steps :
74- - uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
75- - uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
76- with :
77- go-version-file : ' go.mod'
78- cache : true
79- - uses : hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
80- with :
81- terraform_wrapper : false
82- - run : go mod download
83- - env :
86+ if : matrix.target == 'UpCloud'
87+ - name : Test against Minio
88+ env :
8489 TF_ACC : " 1"
8590 TEST_TARGET : Minio
8691 OBJSTO_ACCESS_KEY : access_key
9297
9398 go test -v -cover ./internal/provider/
9499 timeout-minutes : 10
95-
96- test-moto :
97- name : Acceptance Tests (moto)
98- needs : build
99- runs-on : ubuntu-latest
100- timeout-minutes : 15
101- steps :
102- - uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
103- - uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
104- with :
105- go-version-file : ' go.mod'
106- cache : true
107- - uses : hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
108- with :
109- terraform_wrapper : false
110- - run : go mod download
111- - env :
100+ if : matrix.target == 'Minio'
101+ - name : Test against moto
102+ env :
112103 TF_ACC : " 1"
113104 TEST_TARGET : moto
114105 OBJSTO_ACCESS_KEY : access_key
@@ -120,3 +111,4 @@ jobs:
120111
121112 go test -v -cover ./internal/provider/
122113 timeout-minutes : 10
114+ if : matrix.target == 'moto'
0 commit comments