Skip to content

Commit

Permalink
- Add tests
Browse files Browse the repository at this point in the history
- Add gitignore
- Update example module setup and name
- Move TF versions to a single location
- Fix MODULE_DIRECTORIES error
  • Loading branch information
AutomationD committed Dec 12, 2024
1 parent 78b4518 commit 9c43320
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ defaults:
on:
pull_request:
env:
TERRAFORM_LOCATIONS: '[".", "./examples/complete/"]' # List of directories to test
MODULE_DIRECTORIES: '[".", "./examples/complete/"]' # List of directories to test
TERRAFORM_VERSIONS: '["1.5.6", "1.10.1"]' # Current and latest Terraform

jobs:
# Performs linting and format checks and suggests fixes on PR
Expand All @@ -15,8 +16,8 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
terraform_version: [1.5.6, 1.10.1]
directory: ${{ fromJson(env.TERRAFORM_DIRECTORIES) }}
terraform_version: ${{ fromJson(env.TERRAFORM_VERSIONS) }}
directory: ${{ fromJson(env.MODULE_DIRECTORIES) }}
fail-fast: false
steps:
- name: Checkout Code
Expand Down Expand Up @@ -50,8 +51,8 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
terraform_version: [1.5.6, 1.10.1] # Actual and latest versions used
directory: ${{ fromJson(env.TERRAFORM_DIRECTORIES) }}
terraform_version: ${{ fromJson(env.TERRAFORM_VERSIONS) }}
directory: ${{ fromJson(env.MODULE_DIRECTORIES) }}
fail-fast: false
steps:
- name: Checkout Code
Expand Down Expand Up @@ -84,6 +85,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
terraform_version: ${{ fromJson(env.TERRAFORM_VERSIONS) }}
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
Expand All @@ -98,13 +100,6 @@ jobs:
with:
go-version: 1.23.x

- name: Checkout Code
uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: atun-${{ matrix.os }}-${{ github.sha }}
path: bin

- name: Run Tests
working-directory: test/
env:
Expand Down

0 comments on commit 9c43320

Please sign in to comment.