Skip to content

Commit 31903b5

Browse files
ci: add opentofu acceptance test
1 parent 5a612ad commit 31903b5

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

.github/workflows/acceptance.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
echo "cloudstack-versions=${{ env.CLOUDSTACK_VERSIONS }}" >> $GITHUB_OUTPUT
5151
5252
acceptance-terraform:
53-
name: Acceptance Tests - Terraform ${{ matrix.terraform-version }}, Cloudstack ${{ matrix.cloudstack-version }}
53+
name: Terraform ${{ matrix.terraform-version }} with Cloudstack ${{ matrix.cloudstack-version }}
5454
needs: [prepare-matrix]
5555
runs-on: ubuntu-latest
5656
steps:
@@ -59,7 +59,7 @@ jobs:
5959
uses: actions/setup-go@v3
6060
with:
6161
go-version-file: 'go.mod'
62-
- name: Setup Cloudstack v${{ matrix.cloudstack-version }}
62+
- name: Configure Cloudstack v${{ matrix.cloudstack-version }}
6363
uses: ./.github/workflows/setup-cloudstack
6464
id: setup-cloudstack
6565
with:
@@ -87,3 +87,40 @@ jobs:
8787
- '1.7.*'
8888
- '1.8.*'
8989
cloudstack-version: ${{ fromJson(needs.prepare-matrix.outputs.cloudstack-versions) }}
90+
91+
acceptance-opentofu:
92+
name: OpenTofu ${{ matrix.opentofu-version }} with Cloudstack ${{ matrix.cloudstack-version }}
93+
needs: [prepare-matrix]
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v3
97+
- name: Set up Go
98+
uses: actions/setup-go@v3
99+
with:
100+
go-version-file: 'go.mod'
101+
- name: Configure Cloudstack v${{ matrix.cloudstack-version }}
102+
uses: ./.github/workflows/setup-cloudstack
103+
id: setup-cloudstack
104+
with:
105+
cloudstack-version: ${{ matrix.cloudstack-version }}
106+
- uses: opentofu/setup-opentofu@v1
107+
with:
108+
tofu_version: ${{ matrix.opentofu-version }}
109+
- name: Run acceptance test
110+
env:
111+
CLOUDSTACK_USER_ID: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_USER_ID }}
112+
CLOUDSTACK_API_KEY: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_API_KEY }}
113+
CLOUDSTACK_SECRET_KEY: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_SECRET_KEY }}
114+
run: |
115+
make testacc
116+
services:
117+
cloudstack-simulator:
118+
image: apache/cloudstack-simulator:${{ matrix.cloudstack-version }}
119+
ports:
120+
- 8080:5050
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
opentofu-version:
125+
- '1.6.*'
126+
cloudstack-version: ${{ fromJson(needs.prepare-matrix.outputs.cloudstack-versions) }}

0 commit comments

Comments
 (0)