@@ -721,57 +721,78 @@ jobs:
721721 exit 1
722722 fi
723723
724- # arm64:
725- # runs-on: buildjet-2vcpu-ubuntu-2204-arm
726- # name: Version detection on arm
727- # steps:
728- # - name: Checkout
729- # uses: actions/checkout@v4
730- # with:
731- # persist-credentials: false
732- #
733- # - name: Version unsupported on arm
734- # uses: ./terraform-version
735- # continue-on-error: true
736- # id: arm-unsupported
737- # env:
738- # TERRAFORM_VERSION: 0.12.0
739- # with:
740- # path: tests/workflows/test-version/empty
741- #
742- # - name: Check failed to download unsupported platform
743- # run: |
744- # if [[ "${{ steps.arm-unsupported.outcome }}" != "failure" ]]; then
745- # echo "Did not fail correctly"
746- # exit 1
747- # fi
748- #
749- # - name: Version doesn't exist
750- # uses: ./terraform-version
751- # continue-on-error: true
752- # id: no-such-version
753- # with:
754- # path: tests/workflows/test-version/nosuchversion
755- #
756- # - name: Check failed to download no such version
757- # run: |
758- # if [[ "${{ steps.no-such-version.outcome }}" != "failure" ]]; then
759- # echo "Did not fail correctly"
760- # exit 1
761- # fi
762- #
763- # - name: Test terraform-version
764- # uses: ./terraform-version
765- # id: terraform-version
766- # with:
767- # path: tests/workflows/test-version/tfswitch
768- #
769- # - name: Check the version
770- # run: |
771- # if [[ "$DETECTED_TERRAFORM_VERSION" != "1.1.0" ]]; then
772- # echo "::error:: Terraform version not set from .tfswitchrc"
773- # exit 1
774- # fi
724+ arm64 :
725+ runs-on : ubuntu-24.04-arm
726+ name : Version detection on arm
727+ steps :
728+ - name : Checkout
729+ uses : actions/checkout@v4
730+ with :
731+ persist-credentials : false
732+
733+ - name : Version unsupported on arm
734+ uses : ./terraform-version
735+ continue-on-error : true
736+ id : arm-unsupported
737+ env :
738+ TERRAFORM_VERSION : 0.12.0
739+ with :
740+ path : tests/workflows/test-version/empty
741+
742+ - name : Check failed to download unsupported platform
743+ env :
744+ OUTCOME : ${{ steps.arm-unsupported.outcome }}
745+ run : |
746+ if [[ "$OUTCOME" != "failure" ]]; then
747+ echo "Did not fail correctly"
748+ exit 1
749+ fi
750+
751+ - name : Version doesn't exist
752+ uses : ./terraform-version
753+ continue-on-error : true
754+ id : no-such-version
755+ with :
756+ path : tests/workflows/test-version/nosuchversion
757+
758+ - name : Check failed to download no such version
759+ env :
760+ OUTCOME : ${{ steps.no-such-version.outcome }}
761+ run : |
762+ if [[ "$OUTCOME" != "failure" ]]; then
763+ echo "Did not fail correctly"
764+ exit 1
765+ fi
766+
767+ - name : Test terraform-version
768+ uses : ./terraform-version
769+ id : terraform-version
770+ with :
771+ path : tests/workflows/test-version/tfswitch
772+
773+ - name : Check the version
774+ env :
775+ DETECTED_TERRAFORM_VERSION : ${{ steps.terraform-version.outputs.terraform }}
776+ run : |
777+ if [[ "$DETECTED_TERRAFORM_VERSION" != "1.1.0" ]]; then
778+ echo "::error:: Terraform version not set from .tfswitchrc"
779+ exit 1
780+ fi
781+
782+ - name : Test tofu-version
783+ uses : ./tofu-version
784+ id : tofu-version
785+ with :
786+ path : tests/workflows/test-version/tofuenv
787+
788+ - name : Check the version
789+ env :
790+ DETECTED_TOFU_VERSION : ${{ steps.tofu-version.outputs.tofu }}
791+ run : |
792+ if [[ "$DETECTED_TOFU_VERSION" != "1.8.5" ]]; then
793+ echo "::error:: Terraform version not set from .tfswitchrc"
794+ exit 1
795+ fi
775796
776797 terraform_opentofu_version :
777798 runs-on : ubuntu-24.04
0 commit comments