Skip to content

Commit 12f3ad2

Browse files
authored
Split CI jobs, improve overall CI duration (#2733)
* `Quarkus Integration Tests` removes 15 minutes from `Integration Tests` (leaving 16 minutes total test task runtime) * `Quarkus Admin Tests` removes 6 minutes from `Quarkus Tests` (leaving 20 minutes total test task runtime) Intentionally not changing the name of `Quarkus Tests` as it's a required check, changing it would render this change in unmergeable. Note that the time refer to the test _task_ runtimes. Test task execution overlaps with other tasks.
1 parent ea50fe3 commit 12f3ad2

File tree

2 files changed

+89
-8
lines changed

2 files changed

+89
-8
lines changed

.asf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ github:
5656
- markdown-link-check
5757
- "Unit Tests"
5858
- "Quarkus Tests"
59+
- "Quarkus Integration Tests"
60+
- "Quarkus Admin Tests"
5961
- "Integration Tests"
6062
- regtest
6163
- spark-plugin-regtest

.github/workflows/gradle.yml

Lines changed: 87 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ env:
3939

4040
jobs:
4141

42+
# Durations (approximates from GH CI):
43+
# (all):test 16m
4244
unit-tests:
4345
name: Unit Tests
4446
runs-on: ubuntu-latest
@@ -77,6 +79,8 @@ jobs:
7779
**/build/test-results/**
7880
**/build/reports/tests/**
7981
82+
# Durations (approximates from GH CI):
83+
# - :polaris-runtime-service:test 22m
8084
quarkus-tests:
8185
name: Quarkus Tests
8286
runs-on: ubuntu-latest
@@ -91,28 +95,99 @@ jobs:
9195
distribution: 'temurin'
9296
- name: Prepare Gradle build cache
9397
uses: ./.github/actions/ci-incr-build-cache-prepare
94-
- name: Run Quarkus tests
98+
- name: Run Quarkus runtime tests
9599
env:
96100
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
97101
run: |
98-
./gradlew \
99-
:polaris-runtime-service:test \
100-
:polaris-admin:test \
101-
--continue
102+
./gradlew :polaris-runtime-service:test --continue
103+
- name: Save partial Gradle build cache
104+
uses: ./.github/actions/ci-incr-build-cache-save
105+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
106+
with:
107+
job-name: 'quarkus-runtime-tests'
108+
- name: Archive test results
109+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
110+
if: always()
111+
with:
112+
name: upload-quarkus-runtime-test-artifacts
113+
path: |
114+
**/build/test-results/**
115+
**/build/reports/tests/**
116+
117+
# Durations (approximates from GH CI):
118+
# - :polaris-runtime-service:intTest 15m
119+
quarkus-int-tests:
120+
name: Quarkus Integration Tests
121+
runs-on: ubuntu-latest
122+
permissions:
123+
contents: read
124+
steps:
125+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
126+
- name: Set up JDK 21
127+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
128+
with:
129+
java-version: '21'
130+
distribution: 'temurin'
131+
- name: Prepare Gradle build cache
132+
uses: ./.github/actions/ci-incr-build-cache-prepare
133+
- name: Run Quarkus runtime tests
134+
env:
135+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
136+
run: |
137+
./gradlew :polaris-runtime-service:intTest --continue
102138
- name: Save partial Gradle build cache
103139
uses: ./.github/actions/ci-incr-build-cache-save
104140
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
105141
with:
106-
job-name: 'quarkus-tests'
142+
job-name: 'quarkus-runtime-inttests'
107143
- name: Archive test results
108144
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
109145
if: always()
110146
with:
111-
name: upload-quarkus-test-artifacts
147+
name: upload-quarkus-runtime-inttest-artifacts
112148
path: |
113149
**/build/test-results/**
114150
**/build/reports/tests/**
115151
152+
# Durations (approximates from GH CI):
153+
# - :polaris-admin:test 6m
154+
quarkus-admin-tests:
155+
name: Quarkus Admin Tests
156+
runs-on: ubuntu-latest
157+
permissions:
158+
contents: read
159+
steps:
160+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
161+
- name: Set up JDK 21
162+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
163+
with:
164+
java-version: '21'
165+
distribution: 'temurin'
166+
- name: Prepare Gradle build cache
167+
uses: ./.github/actions/ci-incr-build-cache-prepare
168+
- name: Run Quarkus admin tests
169+
env:
170+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
171+
run: |
172+
./gradlew :polaris-admin:test --continue
173+
- name: Save partial Gradle build cache
174+
uses: ./.github/actions/ci-incr-build-cache-save
175+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
176+
with:
177+
job-name: 'quarkus-admin-tests'
178+
- name: Archive test results
179+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
180+
if: always()
181+
with:
182+
name: upload-quarkus-admin-test-artifacts
183+
path: |
184+
**/build/test-results/**
185+
**/build/reports/tests/**
186+
187+
# Durations (approximates from GH CI):
188+
# - :polaris-spark-integration-*:intTest 6m (2x)
189+
# - :polaris-runtime-spark-tests:intTest 4m
190+
# - :polaris-persistence-nosql-mongodb:intTest 1m
116191
integration-tests:
117192
name: Integration Tests
118193
runs-on: ubuntu-latest
@@ -128,7 +203,11 @@ jobs:
128203
- name: Prepare Gradle build cache
129204
uses: ./.github/actions/ci-incr-build-cache-prepare
130205
- name: Run integration tests
131-
run: ./gradlew intTest --continue
206+
run: |
207+
./gradlew \
208+
intTest \
209+
-x :polaris-runtime-service:intTest \
210+
--continue
132211
env:
133212
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
134213
- name: Save partial Gradle build cache

0 commit comments

Comments
 (0)