Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zcemycl committed Apr 7, 2024
1 parent 60763a1 commit 2e549ae
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Terraform CI

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
lint:
strategy:
fail-fast: false
matrix:
terraform-version: ["3.11"]
os: [ubuntu-22.04, macos-latest, windows-latest]
path:
- src/tf/batch-lambda
- src/tf/aurora-postgres-rds
- src/tf/cognito-app/infrastructure

runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository to the runner
uses: actions/checkout@v2

- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform-version }}

- name: Terraform init
working-directory: ${{ matrix.path }}
id: init
run: terraform init

- name: Terraform format
working-directory: ${{ matrix.path }}
id: fmt
run: terraform fmt -check

- name: Terraform validate
working-directory: ${{ matrix.path }}
id: validate
run: terraform validate

0 comments on commit 2e549ae

Please sign in to comment.