Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mweirauch committed Sep 7, 2024
1 parent 0002dd3 commit fabb730
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
DEFAULT_JAVA: 11
SONAR_JAVA: 17
TARGET_JAVA_CLASS_FILE_VERSION: 52 # Java 8

jobs:
Expand All @@ -24,9 +25,6 @@ jobs:
fetch-depth: 0 # SonarCloud doesn't like shallow clones

- name: Setup Java
# uses: joschi/setup-jdk@v2
# with:
# java-version: ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin
Expand All @@ -43,15 +41,15 @@ jobs:
run: 'javap -verbose target/classes/io/github/mweirauch/micrometer/jvm/extras/ProcessMemoryMetrics.class | grep "major version: ${{ env.TARGET_JAVA_CLASS_FILE_VERSION }}"'

- name: Cache SonarCloud packages
if: env.SONAR_TOKEN != null && matrix.java == 17
if: env.SONAR_TOKEN != null && matrix.java == env.SONAR_JAVA
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: SonarCloud analysis
if: env.SONAR_TOKEN != null && matrix.java == 17
if: env.SONAR_TOKEN != null && matrix.java == env.SONAR_JAVA
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down

0 comments on commit fabb730

Please sign in to comment.