chore: update build and tooling to utilize new java version #3504
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: PR | |
on: | |
pull_request: | |
branches: [ master, main ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
build: | |
- java: 17 | |
profile: codequality | |
- java: 8 | |
profile: java8 | |
name: with Java ${{ matrix.build.java }} | |
runs-on: ${{ matrix.os}} | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 | |
with: | |
java-version: ${{ matrix.build.java }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559 | |
with: | |
languages: java | |
- name: Cache local Maven repository | |
uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}${{ matrix.build.java }}-maven- | |
- name: Verify with Maven | |
run: mvn --batch-mode --update-snapshots --activate-profiles e2e,${{ matrix.build.profile }} verify | |
- if: matrix.build.java == '17' | |
name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5.3.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
flags: unittests # optional | |
name: coverage # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@606392577144219644443c010bc0e17ad563e559 |