-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 953 Bytes
/
pr.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
39
40
41
name: Pull Request
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
unittests:
name: Terraform v${{matrix.terraform_version}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
terraform_version: ['1.6.6', '1.7.5', '1.8.5', '1.9.2']
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{matrix.terraform_version}}
- name: Terraform init (v${{matrix.terraform_version}})
run: |
for i in $(find . -name tests -exec dirname {} \;); do
echo "Running tests for: \"$i\""
terraform -chdir="$i" init
echo;
done
- name: Run Tests
run: |
for i in $(find . -name tests -exec dirname {} \;); do
echo "Running tests for: \"$i\""
terraform -chdir="$i" test
echo;
done