# ACDL Patterns Plan Pipeline — GitHub Actions (production)
#
# Runs on PRs to main. For each L2 module, runs a plan-only (offline
# --check-only mode: resolves the sample contract for the module, runs the
# adapter, validates the emitted Terraform structure).
name: acdl-patterns-plan

on:
  pull_request:
    branches: [main]

jobs:
  pattern-plan:
    name: Pattern plan (${{ matrix.module }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        module: [static-assets, microservice]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Install dependencies
        run: pip install jsonschema pyyaml boto3
      - name: Pattern plan check (${{ matrix.module }})
        run: bash scripts/run_pattern_plan.sh --check-only ${{ matrix.module }}