Skip to content

Appflow flow status #18030

Appflow flow status

Appflow flow status #18030

# Copyright IBM Corp. 2014, 2026
# "SPDX-License-Identifier: MPL-2.0"
name: Acceptance Test Embedded Configuration Linting
on:
push:
branches:
- main
- "release/**"
pull_request:
paths:
- .github/workflows/acctest-terraform-embedded-lint.yml
- .ci/.tflint.hcl
- .ci/.tflint_opa.hcl
- .ci/opa-policies/**
- .ci/scripts/validate-terraform.sh
- .ci/tools/go.mod
- go.sum
- 'internal/service/**/*_test.go'
## NOTE: !!!
## When changing these workflows, ensure that the following is updated:
## - Documentation: docs/continuous-integration.md
## - Documentation: docs/makefile-cheat-sheet.md
## - Makefile: ./GNUmakefile
jobs:
tflint-opa-policy-tests:
uses: ./.github/workflows/tflint-opa-policy-tests.yml
terrafmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: cd .ci/tools && go install github.com/katbyte/terrafmt
- run: |
find ./internal/service -type f -name '*_test.go' \
| sort -u \
| xargs -I {} terrafmt diff --check --fmtcompat {}
tflint:
name: Validate Acceptance Test Terraform
needs: tflint-opa-policy-tests
runs-on: custom-ubuntu-22.04-xl
strategy:
matrix:
path: ['[a-f]', '[g-z]']
env:
TEST_FILES_PARTITION: '\./internal/service/${{ matrix.path }}.*/.*_test\.go'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
name: Cache plugin dir
continue-on-error: true
timeout-minutes: 2
with:
path: ~/.tflint.d/plugins
key: ${{ runner.os }}-tflint-${{ hashFiles('.ci/.tflint.hcl') }}
- run: cd .ci/tools && go install github.com/katbyte/terrafmt
- run: cd .ci/tools && go install github.com/terraform-linters/tflint
- run: tflint --config .ci/.tflint.hcl --init
- run: echo -n "File count $( find ./internal -type f -regextype egrep -regex ${{ env.TEST_FILES_PARTITION }} | wc -l | xargs )"
- run: |
find ./internal -type f -regextype egrep -regex ${{ env.TEST_FILES_PARTITION }} \
| .ci/scripts/validate-terraform.sh
env:
TFLINT_OPA_POLICY_DIR: ${{ github.workspace }}/.ci/opa-policies