diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 06b6aa0..d382401 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -16,20 +16,23 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + java: [17, 21] steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: temurin + cache: maven + - name: Verify formatting and static analysis + run: mvn -B -ntp spotless:check checkstyle:check pmd:check + - name: Build with Maven + run: mvn -B -ntp package + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/pom.xml b/pom.xml index 26f377a..341f5ad 100644 --- a/pom.xml +++ b/pom.xml @@ -80,6 +80,60 @@ + + com.diffplug.spotless + spotless-maven-plugin + 2.43.0 + + + + + + + + + verify + + check + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.0 + + google_checks.xml + ${project.build.sourceEncoding} + true + true + + + + verify + + check + + + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.21.0 + + true + + + + verify + + check + + + +