ci: skip Build & Test and CodeQL workflows on docs-only changes #204
This file contains hidden or 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: Build & Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'docs/**' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ '21', '25' ] | |
| name: Build & Test (JDK ${{ matrix.java }}) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Make scripts executable | |
| run: | | |
| chmod +x ci/*.sh | |
| chmod +x docs/demo/proof/proof-runner.sh | |
| chmod +x docs/demo/proof/lib/*.sh | |
| - name: ShellCheck (bash scripts) [JDK 21 only] | |
| if: matrix.java == '21' | |
| uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 | |
| with: | |
| scandir: | | |
| ci | |
| docs/demo/proof | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: maven | |
| # ------------------------------------------------- | |
| # Cache Maven Wrapper distributions (prevents flaky downloads) | |
| # ------------------------------------------------- | |
| - name: Cache Maven Wrapper dists | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/wrapper/dists | |
| key: ${{ runner.os }}-mvnw-dists-${{ hashFiles('**/.mvn/wrapper/maven-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mvnw-dists- | |
| # ------------------------------------------------- | |
| # Core generator (GA contract) → JDK 21 only | |
| # ------------------------------------------------- | |
| - name: Build generator (tests + coverage) [JDK 21 only] | |
| if: matrix.java == '21' | |
| run: mvn -B -q -ntp clean verify | |
| # ------------------------------------------------- | |
| # Forward-compat smoke → JDK 25 only (no core test contract) | |
| # Build JAR without tests so we can run generated-project smoke | |
| # ------------------------------------------------- | |
| - name: Build generator JAR (skip tests) [JDK 25 only] | |
| if: matrix.java == '25' | |
| run: mvn -B -q -ntp -DskipTests clean package | |
| # ------------------------------------------------- | |
| # JDK 21 → full verification set (default + proof + minimal no-sample) | |
| # ------------------------------------------------- | |
| - name: Verify generated project (hex, guardrails basic, sample basic) [default] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-hex-grbasic-sbasic | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35hexgrbasicsbasic | |
| DESCRIPTION: "CI verify (default): hexagonal, guardrails=basic, sample=basic" | |
| run: ./ci/verify-gen-hex-guardrails-basic-sample-basic.sh | |
| - name: Verify generated project (std, guardrails basic, sample basic) [default] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-std-grbasic-sbasic | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35stdgrbasicsbasic | |
| DESCRIPTION: "CI verify (default): standard, guardrails=basic, sample=basic" | |
| run: ./ci/verify-gen-std-guardrails-basic-sample-basic.sh | |
| - name: Verify generated project (hex, guardrails strict, sample none) [no-sample] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-hex-grstrict-snone | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35hexgrstrictsnone | |
| DESCRIPTION: "CI verify (no-sample): hexagonal, guardrails=strict, sample=none" | |
| run: ./ci/verify-gen-hex-guardrails-strict-sample-none.sh | |
| - name: Verify generated project (std, guardrails strict, sample none) [no-sample] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-std-grstrict-snone | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35stdgrstrictsnone | |
| DESCRIPTION: "CI verify (no-sample): standard, guardrails=strict, sample=none" | |
| run: ./ci/verify-gen-std-guardrails-strict-sample-none.sh | |
| - name: Verify generated project (hex, guardrails strict, sample basic) [proof] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-hex-grstrict-sbasic | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35hexgrstrictsbasic | |
| DESCRIPTION: "CI verify (proof): hexagonal, guardrails=strict, sample=basic" | |
| run: ./ci/verify-gen-hex-guardrails-strict-sample-basic.sh | |
| - name: Verify generated project (std, guardrails strict, sample basic) [proof] | |
| if: matrix.java == '21' | |
| env: | |
| ARTIFACT_ID: gen-j21-b35-std-grstrict-sbasic | |
| PACKAGE_NAME: io.github.blueprintplatform.genj21b35stdgrstrictsbasic | |
| DESCRIPTION: "CI verify (proof): standard, guardrails=strict, sample=basic" | |
| run: ./ci/verify-gen-std-guardrails-strict-sample-basic.sh | |
| # ------------------------------------------------- | |
| # JDK 25 → single forward-compat smoke test (generated project only) | |
| # ------------------------------------------------- | |
| - name: Verify generated project (hex, guardrails strict, sample basic) [JDK 25 forward smoke] | |
| if: matrix.java == '25' | |
| env: | |
| JAVA_VERSION: '25' | |
| ARTIFACT_ID: gen-j25-b35-hex-grstrict-sbasic | |
| PACKAGE_NAME: io.github.blueprintplatform.genj25b35hexgrstrictsbasic | |
| DESCRIPTION: "CI verify (forward smoke): hexagonal, guardrails=strict, sample=basic (JDK 25)" | |
| run: ./ci/verify-gen-hex-guardrails-strict-sample-basic.sh | |
| - name: Upload coverage to Codecov | |
| if: matrix.java == '21' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: | | |
| target/site/jacoco/jacoco.xml | |
| target/site/jacoco-it/jacoco-it.xml | |
| flags: codegen-blueprint | |
| name: codegen-blueprint | |
| fail_ci_if_error: false |