Skip to content

Bump actions/setup-java from 4.5.0 to 4.6.0 #555

Bump actions/setup-java from 4.5.0 to 4.6.0

Bump actions/setup-java from 4.5.0 to 4.6.0 #555

Workflow file for this run

name: tests
on: [push, pull_request, workflow_dispatch]
permissions: read-all
jobs:
code-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17' ]
name: Java ${{ matrix.java }} code analysis
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-ca-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-ca-
- name: Code Analysis
run: mvn --batch-mode --activate-profiles github install pmd:check pmd:cpd-check license:check javadoc:jar -DskipTests=true
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17' ]
name: Java ${{ matrix.java }} unit test
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-ut-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-ut-
- name: Unit Tests
run: mvn --batch-mode --activate-profiles github test jacoco:report
- name: Upload test coverage report
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
files: ./ecaudit/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./eclog/target/site/jacoco/jacoco.xml
flags: unit-tests
fail_ci_if_error: false
verbose: true
unit-tests-java-target:
runs-on: ubuntu-latest
name: Java 17 target 17 unit test
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-ut-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-ut-
- name: Unit Tests
run: mvn --batch-mode --activate-profiles github test jacoco:report -Dmaven.compiler.target=17 -Dmaven.compiler.source=17
- name: Upload test coverage report
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
files: ./ecaudit/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./eclog/target/site/jacoco/jacoco.xml
flags: unit-tests
fail_ci_if_error: false
verbose: true
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17' ]
name: Java ${{ matrix.java }} integration tests
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-it-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-it-
- name: Integration Tests
run: mvn --batch-mode --activate-profiles github test-compile failsafe:integration-test failsafe:verify
integration-tests-java-target:
runs-on: ubuntu-latest
name: Java 17 target 17 integration tests
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-it-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-it-
- name: Integration Tests
run: mvn --batch-mode --activate-profiles github test-compile failsafe:integration-test failsafe:verify -Dmaven.compiler.target=17 -Dmaven.compiler.source=17