[terratest] Update flags #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🐛 Validate | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- main | |
# Concurrency ensures only the latest push for this PR will run at a time | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
codeowners: | |
name: "codeowners" | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- name: "Checkout source code at current commit" | |
uses: actions/checkout@v4 | |
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved | |
- uses: mszostok/[email protected] | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
name: "Full check of CODEOWNERS" | |
with: | |
# For now, remove "files" check to allow CODEOWNERS to specify non-existent | |
# files so we can use the same CODEOWNERS file for Terraform and non-Terraform repos | |
# checks: "files,syntax,owners,duppatterns" | |
#checks: "syntax,owners,duppatterns" | |
checks: "syntax,duppatterns" | |
# GitHub access token is required only if the `owners` check is enabled | |
github_access_token: "${{ secrets.GITHUB_TOKEN }}" | |
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved | |
- uses: mszostok/[email protected] | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
name: "Syntax check of CODEOWNERS" | |
with: | |
checks: "syntax,duppatterns" | |
docs: | |
name: "docs" | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check spelling | |
uses: crate-ci/[email protected] | |
with: | |
files: | | |
. | |
# Add atmos required check once tests are set up | |
# Check the test stack configuration as valid atmos config | |
# atmos: | |
# name: "Atmos" | |
# runs-on: | |
# - ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Node | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: 16 | |
# - name: Install Atmos | |
# uses: cloudposse/github-action-setup-atmos@v1 | |
# with: | |
# atmos-version: 1.51.0 | |
# # Validate Atmos | |
# - name: Atmos Validate | |
# id: atmos-validate | |
# shell: bash | |
# run: | | |
# set +e # dont exit on failure yet | |
# atmos_validate_stacks="$(atmos validate stacks 2>&1)" | |
# atmos_validate_stacks_status="$?" | |
# set -e | |
# echo "### Atmos Validate Stacks" >> $GITHUB_STEP_SUMMARY | |
# if [[ $atmos_validate_stacks_status -eq 0 ]]; then | |
# echo "✅ Valid Atmos stack configuration!" >> $GITHUB_STEP_SUMMARY | |
# else | |
# echo "❌ Atmos stack validation failed." >> $GITHUB_STEP_SUMMARY | |
# echo "\`\`\`console" >> $GITHUB_STEP_SUMMARY | |
# echo "$atmos_validate_stacks" >> $GITHUB_STEP_SUMMARY | |
# echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
# fi | |
# exit "$atmos_validate_stacks_status" # exit with resulting code | |
terraform: | |
name: "terraform" | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Install TFLint for pre-commit hook | |
- name: TFLint cache plugin dir | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ~/.tflint.d/plugins | |
key: ubuntu-latest-tflint-${{ hashFiles('.tflint.hcl') }} | |
- name: Setup TFLint | |
uses: terraform-linters/setup-tflint@ba6bb2989f94daf58a4cc6eac2c1ca7398a678bf # v3 | |
with: | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Init TFLint | |
run: tflint --init |