Skip to content

Commit 667c925

Browse files
committed
build: make tests more resilient in ci
1 parent fd6d433 commit 667c925

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ jobs:
4444
with:
4545
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
4646
- name: "🏃‍♂️ Run Tests"
47-
run: ./gradlew check --max-workers=2 --refresh-dependencies --continue
47+
run: >
48+
./gradlew
49+
check
50+
--max-workers=2
51+
--refresh-dependencies
52+
--continue
4853
functionalTests:
4954
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
5055
runs-on: ubuntu-24.04
@@ -65,7 +70,11 @@ jobs:
6570
with:
6671
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
6772
- name: "🏃‍♂️ Run Different Config Functional Tests"
68-
run: ./gradlew core-examples-functional-test-app:check -DTESTCONFIG=${{ matrix.test-config }}
73+
run: >
74+
./gradlew
75+
core-examples-functional-test-app:check
76+
-DTESTCONFIG=${{ matrix.test-config }}
77+
-PgebAtCheckWaiting
6978
publish:
7079
needs: [ coreTests, functionalTests ]
7180
if: ${{ always() && github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (needs.coreTests.result == 'success' || needs.coreTests.result == 'skipped') && (needs.functionalTests.result == 'success' || needs.functionalTests.result == 'skipped') }}

gradle/test-config.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ tasks.named('integrationTest', Test) {
4848
// systemProperty('grails.geb.recording.mode', 'RECORD_ALL')
4949
systemProperty('TESTCONFIG', System.getProperty('TESTCONFIG'))
5050

51+
// Make Geb tests more resilient in slow CI environments
52+
if (project.hasProperty('gebAtCheckWaiting')) {
53+
systemProperty('grails.geb.atCheckWaiting.enabled', 'true')
54+
}
55+
5156
doFirst {
5257
logger.quiet(
5358
'\n - Running tests for configuration: {} and Grails: {}',

0 commit comments

Comments
 (0)