Skip to content

Hide outdated comments #662

Hide outdated comments

Hide outdated comments #662

Workflow file for this run

name: Test terraform-fmt-check
on:
- pull_request
jobs:
canonical_fmt:
runs-on: ubuntu-latest
name: Canonical fmt
steps:
- name: Checkout
uses: actions/checkout@v4
- name: fmt-check
uses: ./terraform-fmt-check
id: fmt-check
with:
path: tests/workflows/test-fmt-check/canonical
- name: Check valid
run: |
if [[ "${{ steps.fmt-check.outputs.failure-reason }}" != "" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi
non_canonical_fmt:
runs-on: ubuntu-latest
name: Non canonical fmt
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: fmt-check
uses: ./terraform-fmt-check
continue-on-error: true
id: fmt-check
with:
path: tests/workflows/test-fmt-check/non-canonical
- name: Check invalid
run: |
if [[ "${{ steps.fmt-check.outcome }}" != "failure" ]]; then
echo "fmt-check did not fail correctly"
exit 1
fi
if [[ "${{ steps.fmt-check.outputs.failure-reason }}" != "check-failed" ]]; then
echo "::error:: failure-reason not set correctly"
exit 1
fi