Skip to content

Commit

Permalink
Merge pull request PANTHEONtech#287 from ihrasko/maintenance
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
ihrasko authored Sep 13, 2024
2 parents 58c3175 + cb1539d commit cb4fe64
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.8
- name: Cache SonarCloud packages
uses: actions/cache@v1
if: ${{ env.SONAR_TOKEN != 0 }}
Expand All @@ -43,15 +47,15 @@ jobs:
- name: Maven test + SonarCloud
if: ${{ env.SONAR_TOKEN != 0 }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.java.source=17
-Dsonar.java.source=21
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
-Dsonar.organization=${{ env.SONAR_ORGANIZATION }}
-Dsonar.host.url=https://sonarcloud.io
- name: Maven test no SonarCloud
if: ${{ env.SONAR_TOKEN == 0 }}
run: mvn -B verify
- name: Upload surefire test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Surefire-Test-Results
path: ~/**/surefire-reports/**/*.txt
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<properties>
<application.main.class>io.lighty.yang.validator.Main</application.main.class>
<application.attach.zip>true</application.attach.zip>
<logback-version>1.5.8</logback-version>
</properties>

<dependencies>
Expand All @@ -37,12 +38,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.7</version>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.7</version>
<version>${logback-version}</version>
</dependency>

<dependency>
Expand Down
10 changes: 5 additions & 5 deletions src/main/assembly/resources/lyv
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

# Set JAVA_HOME to point to a specific Java 17+ JDK
#export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
# Set JAVA_HOME to point to a specific Java 21+ JDK
#export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64

# If JAVA_HOME is not set, try to find it using java itself
if [ -z ${JAVA_HOME} ]; then
command -v java >/dev/null 2>&1 || { echo >&2 "java is required, but it's not installed. Set JAVA_HOME or add java to your path."; exit 1; }
JAVA_HOME=`java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | sed -e 's/^.*java.home = \(.*\)$/\1/'`
fi;

# Make sure we are using Java 17+
# Make sure we are using Java 21+
JAVA_VERSION=`${JAVA_HOME}/bin/java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1`
if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 17 ]; then
echo "Java 17+ is required to run this application!"
if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 21 ]; then
echo "Java 21+ is required to run this application!"
exit -1
fi;

Expand Down

0 comments on commit cb4fe64

Please sign in to comment.