From aa81a01dc6b2f1e4e8b8599f1698d6f5944044c5 Mon Sep 17 00:00:00 2001 From: Antoine Barthelemy Date: Wed, 18 Oct 2023 23:29:48 +0200 Subject: [PATCH] tests --- .github/workflows/tests.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..132d25f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: Tests + +on: [push] + + +jobs: + fmt: + runs-on: ubuntu-latest + strategy: + matrix: + directory: + - ./test_dir/project1 + - ./test_dir/project2 + - ./test_dir/project3 + - ./test_dir/project4 + steps: + - uses: actions/checkout@v4 + - uses: hashicorp/setup-terraform@v2 + - run: terraform fmt -recursive -check + working-directory: ${{ matrix.directory }} + init: + needs: [fmt] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: hashicorp/setup-terraform@v2 + - run: terraform init -no-color + validate: + needs: [init] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: hashicorp/setup-terraform@v2 + - run: terraform init -no-color + - run: terraform validate -no-color + plan: + needs: [init] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: hashicorp/setup-terraform@v2 + - run: terraform init -no-color + - run: terraform validate -no-color +