Merge pull request #1289 from joinfaces/dependabot/maven/5.3.x/org.ow… #2792
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: Java CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Java ${{ matrix.java }} | |
strategy: | |
matrix: | |
java: [17,21] | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Set up JDK ${{ matrix.java }} | |
if: ${{ matrix.java == 17 }} | |
uses: actions/setup-java@v4.2.2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
- name: Set up GraalVM ${{ matrix.java }} | |
if: ${{ matrix.java == 21 }} | |
uses: graalvm/setup-graalvm@v1.2.2 | |
with: | |
java-version: '21' | |
distribution: 'graalvm-community' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Cache local Maven repository | |
uses: actions/cache@v4.0.2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- uses: browser-actions/setup-firefox@v1.5.2 | |
- uses: browser-actions/setup-chrome@v1.7.2 | |
- name: Validate | |
run: ./mvnw -B clean validate | |
- name: Static Validation | |
run: ./mvnw -B -Pcheck-duplicate,check-checkstyle,check-cycles,check-cpd,check-pmd,check-spotbugs -DskipTests=true -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -DnvdApiKey=${{ secrets.NVDAPIKEY }} install | |
#run: ./mvnw -B -Pcheck-duplicate,check-checkstyle,check-cycles,check-cpd,check-pmd,check-spotbugs,check-dependency -DskipTests=true -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -DnvdApiKey=${{ secrets.NVDAPIKEY }} install | |
- name: Tests | |
run: ./mvnw -B -DwebDriverType=chrome verify | |
- name: Build Native Image | |
if: ${{ matrix.java == 21 }} | |
run: ./mvnw -B -Pnative -DskipTests=true spring-boot:build-image | |
- uses: codecov/codecov-action@v4.5.0 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
if: ${{ matrix.java == 17 && github.event_name == 'push' && github.ref_name == '5.3.x' && github.repository_owner == 'joinfaces' }} | |
- name: Sonarqube | |
env: | |
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ matrix.java == 17 && github.event_name == 'push' && github.ref_name == '5.3.x' && github.repository_owner == 'joinfaces' }} | |
run: ./mvnw -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Pcheck-sonarqube sonar:sonar |