Feature/key #41
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: Check codegen and formatting | |
| #on: [push, pull_request] | |
| #on: [pull_request] | |
| on: | |
| # Trigger the workflow on push to master (ignoring .md only changes) | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '**.md' | |
| # Trigger the workflow on any pull_request (ignoring .md only changes) | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| # Enable manual triggering (important for contributors to enable a check on their fork) | |
| workflow_dispatch: | |
| # If a build is running in the current branch, and the branch is updated, we cancel the previous build and start | |
| # a new one with the updated changes. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Run checkstyle validations for pipeline | |
| checkstyle_check: | |
| name: Validate checkstyle | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout latest code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: "0" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| cache: 'gradle' | |
| - name: Validate Project Checkstyle | |
| run: ./gradle checkstyleMain | |
| spotless_check: | |
| name: Spotless check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout latest code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: "0" | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| cache: 'gradle' | |
| - name: Generate code and format | |
| run: | | |
| ./gradlew :jmlparser-metamodel-generators:run | |
| ./gradlew :jmlparser-core-generators:run | |
| ./gradlew spotlessCheck | |
| git diff --exit-code |