diff --git a/.github/workflows/graalvm.yml b/.github/workflows/graalvm.yml index 1216b9307..f57cd810d 100644 --- a/.github/workflows/graalvm.yml +++ b/.github/workflows/graalvm.yml @@ -28,6 +28,7 @@ on: jobs: build: + if: github.repository == 'apache/shardingsphere-elasticjob' strategy: matrix: java: [ '22.0.2' ] diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8bc9771b2..23da1f5b9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -26,23 +26,22 @@ on: jobs: build: + if: github.repository == 'apache/shardingsphere-elasticjob' strategy: matrix: - java: [ 8, 17, 21, 22 ] + java: [ 17, 21, 22 ] os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ] - runs-on: ${{ matrix.os }} - steps: - name: Configure Git if: matrix.os == 'windows-latest' run: | git config --global core.longpaths true - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'temurin' java-version: ${{ matrix.java }} cache: 'maven' - name: Build with Maven in Windows @@ -60,3 +59,29 @@ jobs: file: '**/target/site/jacoco/jacoco.xml' - name: Build Examples with Maven run: ./mvnw clean package -B -f examples/pom.xml -T1C + ci-jdk8: + if: github.repository == 'apache/shardingsphere-elasticjob' + name: CI - JDK 8 on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - name: Support Long Paths in Windows + if: matrix.os == 'windows-latest' + run: git config --global core.longpaths true + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + cache: 'maven' + - name: Build prod with Maven + run: ./mvnw clean install -DskipTests -B -e -T1C + - name: Setup JDK 8 for Test + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 8 + - name: Run Tests with JDK 8 + run: ./mvnw test -B -e -T1C diff --git a/.github/workflows/required-check.yml b/.github/workflows/required-check.yml index 229dc8df4..5fc881752 100644 --- a/.github/workflows/required-check.yml +++ b/.github/workflows/required-check.yml @@ -28,6 +28,7 @@ concurrency: jobs: check-checkstyle: + if: github.repository == 'apache/shardingsphere-elasticjob' name: Check - CheckStyle runs-on: ubuntu-latest timeout-minutes: 10 @@ -37,6 +38,7 @@ jobs: run: ./mvnw checkstyle:check -Pcheck -T1C check-spotless: + if: github.repository == 'apache/shardingsphere-elasticjob' name: Check - Spotless runs-on: ubuntu-latest timeout-minutes: 10 @@ -46,6 +48,7 @@ jobs: run: ./mvnw spotless:check -Pcheck -T1C check-license: + if: github.repository == 'apache/shardingsphere-elasticjob' name: Check - License runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/pom.xml b/pom.xml index 15a3aa9ca..c01cdbe81 100644 --- a/pom.xml +++ b/pom.xml @@ -755,14 +755,14 @@ [11,) + + 8 + maven-surefire-plugin - - @{argLine} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -