-
-
Notifications
You must be signed in to change notification settings - Fork 30
53 lines (43 loc) · 1.12 KB
/
testing.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
42
43
44
45
46
47
48
49
50
51
52
53
name: "Unit testing"
on:
pull_request:
branches:
- main
paths-ignore:
- ".config/**"
- ".gitignore"
- ".pre-commit-config.yaml"
- "examples/**"
- "LICENSE"
- "**.md"
- "**.json"
permissions:
id-token: write
contents: read
jobs:
terraform:
runs-on: ubuntu-latest
env:
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
steps:
- name: Download repository
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~>1.9.0"
- name: Terraform init
run: terraform init
- name: Terraform validate
run: terraform validate
- name: "Az CLI login"
uses: azure/login@v2
with:
tenant-id: ${{ secrets.ARM_TENANT_ID }}
client-id: ${{ secrets.ARM_CLIENT_ID }}
subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }}
- name: Terraform test
run: terraform test
if: always()