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 1ed57b8 commit cb44b19
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Test
strategy:
matrix:
java: [11]
java: [11, 17, 21]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -33,32 +33,26 @@ jobs:
java-version: ${{ matrix.java }}
cache: "maven"

# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2

# - name: Cache SonarCloud packages
# uses: actions/cache@v2
# with:
# path: ~/.sonar/cache
# key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar

- name: Build with Maven
run: mvn -B clean verify

- name: Verify Java class file version
run: 'javap -verbose target/classes/io/github/mweirauch/micrometer/jvm/extras/ProcessMemoryMetrics.class | grep "major version: ${{ env.TARGET_JAVA_CLASS_FILE_VERSION }}"'

# - name: SonarCloud analysis
# if: env.SONAR_TOKEN != null && matrix.java == env.DEFAULT_JAVA
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# run: mvn -B jacoco:report jacoco:report-integration sonar:sonar -Dsonar.organization=mweirauch-github -Dsonar.projectKey=mweirauch_micrometer-jvm-extras -Dsonar.host.url=https://sonarcloud.io
- name: Cache SonarCloud packages
if: env.SONAR_TOKEN != null && matrix.java == 17
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B jacoco:report jacoco:report-integration sonar:sonar -Dsonar.organization=mweirauch-github -Dsonar.projectKey=mweirauch_micrometer-jvm-extras -Dsonar.host.url=https://sonarcloud.io

# - name: Publish snapshot
# if: env.OSSRH_USERNAME != null && matrix.os == 'ubuntu-latest' && matrix.java == env.DEFAULT_JAVA && github.ref == 'refs/heads/main'
Expand Down

0 comments on commit cb44b19

Please sign in to comment.