-
Notifications
You must be signed in to change notification settings - Fork 97
40 lines (34 loc) · 1.02 KB
/
ci.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
name: ci
on:
push:
pull_request:
schedule:
- cron: '0 18 * * sun'
jobs:
build:
name: terraform ${{ matrix.terraform_version }} fmt
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
terraform_version:
- latest
- 0.13.0
- 0.12.0
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Terraform
run: |
sudo pip install ansible
sudo ansible-galaxy install diodonfrost.terraform && sudo ln -s /root/.ansible/roles/diodonfrost.terraform /root/.ansible/roles/ansible-role-terraform
sudo ansible-pull -U https://github.com/diodonfrost/ansible-role-terraform tests/test.yml -e "terraform_version=${{ matrix.terraform_version }}"
terraform -version
- name: Terraform fmt
run: |
set -e
terraform fmt -check -diff -recursive