Skip to content

Commit

Permalink
Clean up CI style for TF tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhelba committed Feb 13, 2025
1 parent e0b2c12 commit 13ccb9a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
tox
working-directory: django-resonant-settings
test-cookecutter:
test-cookecutter-python:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -78,3 +78,27 @@ jobs:
testenv:test.deps+=${{ github.workspace }}/django-resonant-settings;
testenv:check-migrations.deps+=${{ github.workspace }}/django-resonant-settings
working-directory: resonant
test-cookiecutter-terraform:
runs-on: ubuntu-latest
defaults:
run:
working-directory: terraform
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Eject from cookiecutter
run: |
cookiecutter --no-input . project_name=Resonant ${{ matrix.cookiecutter-variables }}
- name: Lint Terraform code
run: |
terraform fmt -recursive -check
working-directory: resonant
- name: Validate Terraform code
run: |
terraform init -backend=false
terraform validate
working-directory: resonant
21 changes: 10 additions & 11 deletions {{ cookiecutter.project_slug }}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
jobs:
test:
test-python:
runs-on: ubuntu-latest
services:
postgres:
Expand Down Expand Up @@ -44,23 +44,22 @@ jobs:
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
DJANGO_CELERY_BROKER_URL: amqp://localhost:5672/
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage-testing
terraform:
test-terraform:
runs-on: ubuntu-latest
defaults:
run:
working-directory: terraform
steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

with:
terraform_wrapper: false
- name: Lint Terraform code
run: terraform fmt -check -diff -recursive

- name: Initialize Terraform (offline only)
run: terraform init -backend=false

run: |
terraform fmt -recursive -check
- name: Validate Terraform code
run: terraform validate
run: |
terraform init -backend=false
terraform validate

0 comments on commit 13ccb9a

Please sign in to comment.