chore(deps): update all non-major dependencies #514
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: "Pull request" | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
validation: | |
name: Gradle Wrapper Validation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v3 | |
test: | |
name: Test run | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
java: [ 17, 19 ] | |
needs: validation | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
env: | |
java-version: ${{ matrix.java }} | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ env.java-version }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: ${{ runner.os }}-${{ env.java-version }}-gradle- | |
- name: Make gradlew executable (non-Windows only) | |
if: matrix.os != 'windows-latest' | |
run: chmod +x ./gradlew | |
- name: Gradle Check (non-Windows) | |
if: matrix.os != 'windows-latest' | |
run: ./gradlew --info check | |
- name: Gradle Check (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: gradlew --info check | |
build: | |
name: Sonar analysis | |
needs: validation | |
runs-on: ubuntu-latest | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
if: env.SONAR_TOKEN != null | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 17 | |
if: env.SONAR_TOKEN != null | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Cache SonarCloud packages | |
if: env.SONAR_TOKEN != null | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
if: env.SONAR_TOKEN != null | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build and analyze | |
if: env.SONAR_TOKEN != null | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew build jacocoTestReport sonarqube --info |