Skip to content

Retry Build and Functional Test Steps when timeout occurs #14821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: 7.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 42 additions & 22 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ jobs:
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🔨 Build project"
run: >
./gradlew build :grails-shell-cli:installDist groovydoc
--continue --stacktrace -PonlyCoreTests
--rerun-tasks
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
with:
timeout_seconds: 3600 # normal range 20-40m
max_attempts: 3 # Attempts to address: Connect to repository.apache.org:443 [repository.apache.org/65.109.119.155] failed: Connect timed out
retry_wait_seconds: 600
command: >
./gradlew build :grails-shell-cli:installDist groovydoc
--continue --stacktrace -PonlyCoreTests
--rerun-tasks
functional:
name: "Functional Tests"
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
Expand All @@ -112,13 +117,18 @@ jobs:
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🏃 Run Functional Tests"
run: >
./gradlew bootJar check
--continue --stacktrace
-PonlyFunctionalTests
-PskipHibernate5Tests
-PskipMongodbTests
--rerun-tasks
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
with:
timeout_seconds: 1200 # normal range 10-12m
max_attempts: 3 # Attempts to address: Connect to repository.apache.org:443 [repository.apache.org/65.109.119.155] failed: Connect timed out
retry_wait_seconds: 600
command: >
./gradlew bootJar check
--continue --stacktrace
-PonlyFunctionalTests
-PskipHibernate5Tests
-PskipMongodbTests
--rerun-tasks
mongodbFunctional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Mongodb Functional Tests"
Expand All @@ -141,14 +151,19 @@ jobs:
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🏃 Run Functional Tests"
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: >
./gradlew bootJar cleanTest check
--continue --stacktrace
-PonlyMongodbTests
-PmongodbContainerVersion=${{ matrix.mongodb-version }}
--rerun-tasks
with:
timeout_seconds: 1500 # normal range 15m
max_attempts: 3 # Attempts to address: Connect to repository.apache.org:443 [repository.apache.org/65.109.119.155] failed: Connect timed out
retry_wait_seconds: 600
command: >
./gradlew bootJar cleanTest check
--continue --stacktrace
-PonlyMongodbTests
-PmongodbContainerVersion=${{ matrix.mongodb-version }}
--rerun-tasks
hibernate5Functional:
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
name: "Hibernate5 Functional Tests"
Expand All @@ -170,13 +185,18 @@ jobs:
with:
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
- name: "🏃 Run Functional Tests"
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
env:
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: >
./gradlew bootJar cleanTest check
--continue --stacktrace
-PonlyHibernate5Tests
--rerun-tasks
with:
timeout_seconds: 1200 # normal range 10-12m
max_attempts: 3 # Attempts to address: Connect to repository.apache.org:443 [repository.apache.org/65.109.119.155] failed: Connect timed out
retry_wait_seconds: 600
command: >
./gradlew bootJar cleanTest check
--continue --stacktrace
-PonlyHibernate5Tests
--rerun-tasks
publishGradle:
if: github.repository_owner == 'apache' && github.event_name == 'push'
needs: [ buildGradle ]
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ jobs:
run: |
sed -i "/['\"]groovy\.version['\"][[:space:]]*:/c\'groovy.version':'${{ needs.build_groovy.outputs.groovyVersion }}'," dependencies.gradle
- name: "🔨 Build and test Grails using the locally built Groovy snapshot"
run: >
./gradlew build
-x groovydoc
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
with:
timeout_seconds: 2700 # normal range 10-30m
max_attempts: 3 # Attempts to address: Connect to repository.apache.org:443 [repository.apache.org/65.109.119.155] failed: Connect timed out
retry_wait_seconds: 600
command: >
./gradlew build
-x groovydoc
Loading