mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-09-05 02:19:47 +00:00
feature: build with Java 17 (#2331)
This commit is contained in:
@@ -26,14 +26,14 @@ version: 2
|
|||||||
jobs:
|
jobs:
|
||||||
sonar-pr:
|
sonar-pr:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:11.0-node
|
- image: cimg/openjdk:17.0-node
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
|
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
|
||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y openjdk-11-jdk xvfb
|
sudo apt-get install -y openjdk-17-jdk xvfb
|
||||||
if [ -n "${CIRCLE_PR_NUMBER}" ]; then
|
if [ -n "${CIRCLE_PR_NUMBER}" ]; then
|
||||||
MAVEN_OPTS="-Xmx3000m" xvfb-run ./mvnw -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
|
MAVEN_OPTS="-Xmx3000m" xvfb-run ./mvnw -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
|
||||||
-Dsonar.pullrequest.key=${CIRCLE_PR_NUMBER} \
|
-Dsonar.pullrequest.key=${CIRCLE_PR_NUMBER} \
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
# This Workflow Job will build this project and run Sonar analysis using JDK 11.0.3
|
# This Workflow Job will build this project and run Sonar analysis using JDK 11.0.3
|
||||||
build-and-analyze:
|
build-and-analyze:
|
||||||
|
|
||||||
name: Build and Run Sonar analysis on JDK 11.0.3
|
name: Build and Run Sonar analysis on JDK 17
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -49,11 +49,11 @@ jobs:
|
|||||||
# Disabling shallow clone for improving relevancy of SonarQube reporting
|
# Disabling shallow clone for improving relevancy of SonarQube reporting
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK 11.0.3
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: 11.0.3
|
java-version: '17'
|
||||||
distribution: 'zulu'
|
distribution: 'temurin'
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
# Cache Sonar packages which as used to run anaylysis and collect metrics
|
# Cache Sonar packages which as used to run anaylysis and collect metrics
|
||||||
@@ -79,18 +79,18 @@ jobs:
|
|||||||
# This Workflow Job is going to build the project on the latest stable JDK 11
|
# This Workflow Job is going to build the project on the latest stable JDK 11
|
||||||
build:
|
build:
|
||||||
|
|
||||||
name: Build and Test on JDK 11
|
name: Build and Test on JDK 17
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up JDK 11 (Latest)
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: '17'
|
||||||
distribution: 'zulu'
|
distribution: 'temurin'
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
# Some tests need screen access
|
# Some tests need screen access
|
||||||
|
|||||||
@@ -34,21 +34,18 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
name: Build JDP
|
name: Build on JDK 17
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
java-version: [ 11.0.3, 11 ]
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: '17'
|
||||||
distribution: 'zulu'
|
distribution: 'temurin'
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
|
|
||||||
# Some tests need screen access
|
# Some tests need screen access
|
||||||
|
|||||||
Reference in New Issue
Block a user