This is an automated email from the ASF dual-hosted git repository.
adutra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 5441bb686 feat(ci): Split Java Gradle CI in many jobs to reduce
execution time (#1897)
5441bb686 is described below
commit 5441bb68616d8238787550dd3e12ebc784f4d5f7
Author: Alexandre Dutra <[email protected]>
AuthorDate: Wed Jun 18 15:27:08 2025 +0200
feat(ci): Split Java Gradle CI in many jobs to reduce execution time (#1897)
---
.asf.yaml | 4 +-
.github/workflows/gradle.yml | 90 ++++++++++++++++++++++++++++++--------------
2 files changed, 65 insertions(+), 29 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 87b40ab9a..71f295d35 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -54,7 +54,9 @@ github:
# of the job's `name` property if it's present.
contexts:
- markdown-link-check
- - build
+ - "Unit Tests"
+ - "Quarkus Tests"
+ - "Integration Tests"
- regtest
- spark-plugin-regtest
- site
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index 74fdb8d92..86c0f25e0 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -33,12 +33,22 @@ on:
branches: [ "main" ]
jobs:
+
+ # TODO remove this job in a future PR
build:
runs-on: ubuntu-latest
permissions:
contents: read
+ steps:
+ - name: Always succeeds
+ run: echo "Success!"
+ unit-tests:
+ name: Unit Tests
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 21
@@ -46,52 +56,76 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
-
- # Configure Gradle for optimal use in GiHub Actions, including caching
of downloaded dependencies.
- # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses:
gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
with:
- # The setup-gradle action fails, if the wrapper is not using the
right version or is not present.
- # Our `gradlew` validates the integrity of the `gradle-wrapper.jar`,
so it's safe to disable this.
validate-wrappers: false
-
- - name: Code style checks and tests
- run: ./gradlew --continue check
-
- - name: Check Maven publication
- run: ./gradlew publishToMavenLocal sourceTarball
-
+ - name: Run unit tests
+ run: |
+ ./gradlew check sourceTarball distTar distZip publishToMavenLocal \
+ -x :polaris-runtime-service:test \
+ -x :polaris-admin:test \
+ -x intTest --continue
- name: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
# v4
if: always()
with:
- name: upload-test-artifacts
+ name: upload-unit-test-artifacts
path: |
**/build/test-results/**
- - name: Stop Gradle daemons
- run: ./gradlew --stop
-
- # Ensure that the build works properly when building against the "latest
greatest" Java version
- - name: Set up JDK 23
+ quarkus-tests:
+ name: Quarkus Tests
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ - name: Set up JDK 21
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
with:
- java-version: '23'
+ java-version: '21'
distribution: 'temurin'
- - name: Show Java version
- run: java -version
- - name: Clean
- run: ./gradlew clean
- - name: Build
- run: ./gradlew compileAll
- - name: Run selected tests
- run: ./gradlew :polaris-runtime-service:intTest
+ - name: Setup Gradle
+ uses:
gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
+ with:
+ validate-wrappers: false
+ - name: Run Quarkus tests
+ run: |
+ ./gradlew \
+ :polaris-runtime-service:test \
+ :polaris-admin:test \
+ --continue
+ - name: Archive test results
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
# v4
+ if: always()
+ with:
+ name: upload-quarkus-test-artifacts
+ path: |
+ **/build/test-results/**
+ integration-tests:
+ name: Integration Tests
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ - name: Set up JDK 21
+ uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
+ with:
+ java-version: '21'
+ distribution: 'temurin'
+ - name: Setup Gradle
+ uses:
gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
+ with:
+ validate-wrappers: false
+ - name: Run integration tests
+ run: ./gradlew intTest --continue
- name: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
# v4
if: always()
with:
- name: upload-test-artifacts-java-23
+ name: upload-integration-test-artifacts
path: |
**/build/test-results/**