This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
chore(test): add new examples to terratest #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "**.tf" | |
- "test/*.go" | |
name: terratest | |
jobs: | |
terratest: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22.x" | |
- uses: "google-github-actions/auth@v2" | |
with: | |
project_id: "library-344516" | |
workload_identity_provider: "projects/270410071403/locations/global/workloadIdentityPools/github/providers/padok-gcp-library" | |
- name: tfswitch | |
# Doing a tfswitch --latest because no version is specified in the Terraform code | |
run: | | |
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | |
chmod 755 install.sh | |
./install.sh -b ~/.local/bin v1.2.2 # Last arg is the desired tfswitch version | |
rm install.sh | |
tfswitch -b ~/.local/bin/terraform --latest | |
- name: Test with the Go CLI | |
run: go test -timeout 300s ./test |