From 3276dc73d43d696d40039c34ace146b6a89c9463 Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 15:50:00 +0200 Subject: [PATCH 1/6] ci(github): update actions And switch to Opentofu instead of terraform. --- .github/workflows/test.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3a9ebc2..0f7e823 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,6 +26,11 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v5 + - uses: opentofu/setup-opentofu@v1 - run: cd tests/${{ matrix.testdir }} - - run: terraform init -input=false - - run: terraform validate + - name: OpenTofu fmt + id: fmt + run: tofu fmt -check + continue-on-error: true + - run: tofu init -input=false + - run: tofu validate From e0d3eef5a5ab97fdbcf66a78bae9ddca4d6ed228 Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 15:54:33 +0200 Subject: [PATCH 2/6] wip: print pwd --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0f7e823..0cfe26a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,6 +28,7 @@ jobs: uses: actions/checkout@v5 - uses: opentofu/setup-opentofu@v1 - run: cd tests/${{ matrix.testdir }} + - run: pwd - name: OpenTofu fmt id: fmt run: tofu fmt -check From d4e966bd984cc16862ee430f8e60fa2a439c7c1a Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 15:59:56 +0200 Subject: [PATCH 3/6] wip: use dedicated directories --- .github/workflows/test.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0cfe26a..077dea6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,11 +27,12 @@ jobs: - name: Checkout repo uses: actions/checkout@v5 - uses: opentofu/setup-opentofu@v1 - - run: cd tests/${{ matrix.testdir }} - run: pwd - - name: OpenTofu fmt + - name: Fmt check id: fmt - run: tofu fmt -check + run: tofu fmt -check tests/${{ matrix.testdir }} continue-on-error: true - - run: tofu init -input=false - - run: tofu validate + - name: OpenTofu init + run: tofu init -input=false tests/${{ matrix.testdir }} + - name: Validating + run: tofu validate tests/${{ matrix.testdir }} From 4744621a63676e4867feec1a9c3a8f2de748c435 Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 16:05:28 +0200 Subject: [PATCH 4/6] wip: run always --- .github/workflows/test.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 077dea6..7ffa879 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,10 +29,13 @@ jobs: - uses: opentofu/setup-opentofu@v1 - run: pwd - name: Fmt check - id: fmt - run: tofu fmt -check tests/${{ matrix.testdir }} + working-directory: tests/${{ matrix.testdir }} + run: tofu fmt-check continue-on-error: true - name: OpenTofu init - run: tofu init -input=false tests/${{ matrix.testdir }} + if: always() + working-directory: tests/${{ matrix.testdir }} + run: tofu init -input=false - name: Validating - run: tofu validate tests/${{ matrix.testdir }} + working-directory: tests/${{ matrix.testdir }} + run: tofu validate From 8e70234d9e9c1717ca4133e83d70ee11f9aa87b3 Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 16:07:34 +0200 Subject: [PATCH 5/6] security: use fixed version for action --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7ffa879..8bd18f5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v5 - - uses: opentofu/setup-opentofu@v1 + - uses: opentofu/setup-opentofu@v1.0.6 - run: pwd - name: Fmt check working-directory: tests/${{ matrix.testdir }} From 507f627697d13a623a85f2cd2abe59f964558ad2 Mon Sep 17 00:00:00 2001 From: Lexxy <472167-dstrauss@users.noreply.gitlab.com> Date: Tue, 30 Sep 2025 16:12:38 +0200 Subject: [PATCH 6/6] wip: use hash to reference action than the version tag --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8bd18f5..a7d2d09 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v5 - - uses: opentofu/setup-opentofu@v1.0.6 + - uses: opentofu/setup-opentofu@000eeb8522f0572907c393e8151076c205fdba1b #v1.0.6 - run: pwd - name: Fmt check working-directory: tests/${{ matrix.testdir }}