Skip to content

Commit 5efb525

Browse files
committed
Reenable tests for arm64
1 parent ad96cdb commit 5efb525

File tree

2 files changed

+91
-70
lines changed

2 files changed

+91
-70
lines changed

.github/workflows/test-plan.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,25 +1059,25 @@ jobs:
10591059
path: tests/workflows/test-plan/plan
10601060
label: test-plan test_plan_1_4
10611061

1062-
# arm64:
1063-
# runs-on: buildjet-2vcpu-ubuntu-2204-arm
1064-
# name: Test on arm64
1065-
# permissions:
1066-
# contents: read
1067-
# pull-requests: write
1068-
# env:
1069-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1070-
# steps:
1071-
# - name: Checkout
1072-
# uses: actions/checkout@v4
1073-
# with:
1074-
# persist-credentials: false
1075-
#
1076-
# - name: Plan
1077-
# uses: ./terraform-plan
1078-
# with:
1079-
# path: tests/workflows/test-plan/plan
1080-
# label: arm64
1062+
arm64:
1063+
runs-on: ubuntu-24.04-arm
1064+
name: Test on arm64
1065+
permissions:
1066+
contents: read
1067+
pull-requests: write
1068+
env:
1069+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1070+
steps:
1071+
- name: Checkout
1072+
uses: actions/checkout@v4
1073+
with:
1074+
persist-credentials: false
1075+
1076+
- name: Plan
1077+
uses: ./terraform-plan
1078+
with:
1079+
path: tests/workflows/test-plan/plan
1080+
label: arm64
10811081

10821082
always_new:
10831083
runs-on: ubuntu-24.04

.github/workflows/test-version.yaml

Lines changed: 72 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)