Merge pull request #1223 from dsldevkit/dependabot/maven/ddk-parent/c… #2755
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: verify | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| jobs: | |
| pmd: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: PMD | |
| uses: pmd/[email protected] | |
| id: pmd | |
| with: | |
| version: '7.18.0' | |
| rulesets: 'ddk-configuration/pmd/ruleset.xml' | |
| analyzeModifiedFilesOnly: false | |
| - name: Fail build if there are violations | |
| if: steps.pmd.outputs.violations != 0 | |
| run: exit 1 | |
| maven-verify: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Set up Maven | |
| uses: stCarolas/setup-maven@v5 | |
| with: | |
| maven-version: 3.9.11 | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Set up Workspace Enviroment Variable | |
| run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/.m2/repository | |
| key: ${{ runner.os }}-maven-0-${{ hashFiles('**/pom.xml') }} | |
| - name: Build with Maven within a virtual X Server Environment | |
| run: xvfb-run mvn clean verify checkstyle:check pmd:pmd pmd:check pmd:cpd-check spotbugs:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end | |
| - name: Archive Tycho Surefire Plugin | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: tycho-surefire-plugin | |
| path: ${{ env.GITHUB_WORKSPACE }}/com.avaloq.tools.ddk.xtext.test/target/work/data/.metadata/.log |