-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.02 KB
/
terratest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
run: |
wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh
chmod 755 install.sh
./install.sh -b ./.bin v1.2.2 # Last arg is the desired tfswitch version
rm install.sh
- name: Test with the Go CLI
run: |
.bin/tfswitch -b .bin/terraform
.bin/terraform -v
which terraform
terraform -v