Skip to content

chore: for tests to work, they need code - Doh #3

chore: for tests to work, they need code - Doh

chore: for tests to work, they need code - Doh #3

Workflow file for this run

name: Terraform + OpenTofu Tests
on:
push:
branches:
- main
- chore/add-test-pipeline
pull_request:
env:
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
permissions:
actions: read
checks: write
contents: read
id-token: write
pull-requests: read
jobs:
terraform-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Aqua Cache
uses: actions/cache@v4.0.2
if: ${{ !github.event.act }} # Don't enable the cache step if we're using act for testing
with:
path: ~/.local/share/aquaproj-aqua
key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('aqua.yaml')}}
restore-keys: |
v1-aqua-installer-${{runner.os}}-${{runner.arch}}-
- name: Install Aqua
uses: aquaproj/aqua-installer@4551ec64e21bf0f557c2525135ff0bd2cba40ec7 # v3.0.0
with:
aqua_version: v2.25.2
- name: Aqua Install
shell: bash
run: aqua install --tags terraform
- run: terraform init
- run: terraform test
tofu-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Aqua Cache
uses: actions/cache@v4.0.2
if: ${{ !github.event.act }} # Don't enable the cache step if we're using act for testing
with:
path: ~/.local/share/aquaproj-aqua
key: v1-aqua-installer-${{runner.os}}-${{runner.arch}}-${{hashFiles('aqua.yaml')}}
restore-keys: |
v1-aqua-installer-${{runner.os}}-${{runner.arch}}-
- name: Install Aqua
uses: aquaproj/aqua-installer@4551ec64e21bf0f557c2525135ff0bd2cba40ec7 # v3.0.0
with:
aqua_version: v2.25.2
- name: Aqua Install
shell: bash
run: aqua install --tags tofu
- run: tofu init
- run: tofu test