Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dependabot/maven/mi…
Browse files Browse the repository at this point in the history
…nor-updates-64626ea61c
  • Loading branch information
mvanaken committed Apr 12, 2024
2 parents c110275 + c144828 commit 7bf89c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ shallow_clone: true
init:
- git config --global core.autocrlf input

# We need at least this image to run jdk17 and jdk21 (https://www.appveyor.com/docs/windows-images-software/).
image:
- Visual Studio 2022

environment:
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -mx0 -mmt=0 -snl -snh
MAVEN_OPTS: "-Dmaven.repo.local=C:/Users/appveyor/.m2"
matrix:
- JAVA_HOME: "C:/Program Files/Java/jdk11"
- JAVA_HOME: "C:/Program Files/Java/jdk12"
- JAVA_HOME: "C:/Program Files/Java/jdk17"
- JAVA_HOME: "C:/Program Files/Java/jdk21"

cache:
- C:\Users\appveyor\.m2 -> pom.xml
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
distribution: [ temurin, corretto ]
java-version: [ 11, 17 ]
java-version: [ 17, 21 ]

steps:
- name: Checkout
Expand All @@ -36,25 +36,25 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.distribution }}

- name: Build and deploy with Maven and analyze with Sonar
# Deploy and analyze only the Corretto 11 build
- name: Build with Maven and analyze with Sonar
# Analyze only the Corretto 17 build with Sonar
if: matrix.distribution == 'corretto' && matrix.java-version == '17'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# The value of sonar.projectKey is generated by Sonar and needs to map to its internal project name
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=parsingdata_metal -Dsonar.organization=parsingdata

- name: Build and deploy with Maven
- name: Deploy with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: matrix.distribution == 'corretto' && matrix.java-version == '11'
if: matrix.distribution == 'corretto' && matrix.java-version == '17'
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true deploy

- name: Build with Maven
if: matrix.distribution != 'corretto'
if: matrix.distribution != 'corretto' || matrix.java-version != '17'
run: mvn -B --update-snapshots -Dmaven.test.failure.ignore=true package

- name: Upload Code Coverage to Codecov
# Upload test coverage results only from the Corretto 11 build
if: matrix.distribution == 'corretto' && matrix.java-version == '11'
if: matrix.distribution == 'corretto' && matrix.java-version == '17'
uses: codecov/codecov-action@v4
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>11</release>
<release>17</release>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 7bf89c2

Please sign in to comment.