Skip to content

feat: Creating minikube cluster using tofu #11

feat: Creating minikube cluster using tofu

feat: Creating minikube cluster using tofu #11

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
defaults:
run:
shell: bash
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
project: ${{ steps.changes.outputs.project }}
src: ${{ steps.changes.outputs.src }}
tests: ${{ steps.changes.outputs.tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
workflow: &workflow
- '.github/actions/**'
- '.github/workflows/tests.yaml'
- '.github/workflows/.tests-matrix.yaml'
project: &project
- *workflow
- '.terraform.lock.hcl'
src:
- *project
- '*.tf'
tests:
- *project
- '*.tf'
- 'tests/**'
validate:
name: Validate Configuration
runs-on: ubuntu-latest
outputs:
tofu-version: ${{ steps.tofu-init.outputs.tofu-version }}
if: needs.changes.outputs.project == 'true'
needs:
- changes
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/tofu-init
id: tofu-init
with:
args: '-backend=false'
tofu-version: "latest"
- run: tofu validate
tests-matrix:
uses: ./.github/workflows/.tests-matrix.yaml
name: "${{ matrix.os.name }} (Tofu ${{ needs.validate.outputs.tofu-version }})"
if: '!failure()'
needs:
- changes
- validate
strategy:
matrix:
os:
- name: Ubuntu
image: ubuntu-latest
- name: macOS
image: macos-latest
- name: Windows
image: windows-latest
fail-fast: false
with:
runner: ${{ matrix.os.image }}
tofu-version: "latest"
tflint-version: "latest"
run-tflint: ${{ needs.changes.outputs.tests == 'true' }}
run-tftest: ${{ needs.changes.outputs.tests == 'true' }}
secrets: inherit
status:
name: Status
runs-on: ubuntu-latest
if: always()
needs:
- changes
- validate
- tests-matrix
steps:
- run: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'false' || 'true' }}