Skip to content

Commit f1759b5

Browse files
committed
introduce GRADLE_WEB_TESTS_FLAGS
1 parent f767dc1 commit f1759b5

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/compose-tests.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
branches:
77
- jb-main
88

9+
env:
10+
# Web Tests require running additional processes: karma in node, browser;
11+
# To reduce the memory pressure, we change some defaults:
12+
GRADLE_WEB_TESTS_FLAGS: >-
13+
--no-daemon --stacktrace --no-parallel --no-configuration-cache
14+
-Dorg.gradle.jvmargs="-Xmx8g -XX:+UseParallelGC"
15+
-Porg.gradle.workers.max=1
16+
917
jobs:
1018
compose-desktop-tests:
1119
runs-on: ubuntu-24.04
@@ -203,8 +211,7 @@ jobs:
203211
# Compile tests as a separate step to reduce memory usage and potential OOM during running tests.
204212
- name: Compile ${{ matrix.task }} Tests
205213
run: |
206-
./gradlew compileTestKotlin${{ matrix.task }} \
207-
--no-daemon --stacktrace
214+
./gradlew compileTestKotlin${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }}
208215
209216
- name: Setup Google Chrome
210217
uses: browser-actions/setup-chrome@v2
@@ -220,8 +227,7 @@ jobs:
220227
221228
- name: Run Web Chrome Tests
222229
run: |
223-
./gradlew :mpp:testWeb${{ matrix.task }} \
224-
--no-daemon --stacktrace --no-parallel \
230+
./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
225231
-Pjetbrains.androidx.web.tests.enableFirefox=false \
226232
-Pjetbrains.androidx.web.tests.enableChrome=true
227233
@@ -250,8 +256,7 @@ jobs:
250256
# Compile tests as a separate step to reduce memory usage and potential OOM during running tests.
251257
- name: Compile ${{ matrix.task }} Tests
252258
run: |
253-
./gradlew compileTestKotlin${{ matrix.task }} \
254-
--no-daemon --stacktrace
259+
./gradlew compileTestKotlin${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }}
255260
256261
- name: Setup Missing Packages
257262
run: |
@@ -270,8 +275,7 @@ jobs:
270275
271276
- name: Run Web Firefox Tests
272277
run: |
273-
./gradlew :mpp:testWeb${{ matrix.task }} \
274-
--no-daemon --stacktrace --no-parallel \
278+
./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
275279
-Pjetbrains.androidx.web.tests.enableFirefox=true \
276280
-Pjetbrains.androidx.web.tests.enableChrome=false
277281

0 commit comments

Comments
 (0)