Skip to content

Upgrade actions/setup-java v3.5.1 -> v3.13.0 #250

Upgrade actions/setup-java v3.5.1 -> v3.13.0

Upgrade actions/setup-java v3.5.1 -> v3.13.0 #250

Workflow file for this run

name: Build and verify
on:
pull_request:
push:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- jdk: 11.0.16
sonarEnabled: true
- jdk: 17.0.4
sonarEnabled: false
steps:
- name: Check out code
uses: actions/[email protected]
with:
# Fetch entire history for SonarCloud analysis.
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
cache: maven
- name: Cache SonarCloud packages
if: ${{ matrix.sonarEnabled }}
uses: actions/[email protected]
with:
path: "${HOME}/.sonar/cache"
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Display build environment details
run: mvn --version
- name: Build project
run: mvn -T1C install
- name: Perform SonarCloud analysis
if: ${{ matrix.sonarEnabled }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn sonar:sonar
- name: Remove installed project artifacts
run: mvn build-helper:remove-project-artifact