Merge pull request #988 from dsldevkit/dependabot/maven/ddk-parent/co… #1966
This file contains 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, pull_request] | |
jobs: | |
pmd: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: PMD | |
uses: pmd/[email protected] | |
id: pmd | |
with: | |
version: '7.4.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-22.04 | |
steps: | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- 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@v4 | |
with: | |
name: tycho-surefire-plugin | |
path: ${{ env.GITHUB_WORKSPACE }}/com.avaloq.tools.ddk.xtext.test/target/work/data/.metadata/.log |