ci: limit each test attempt to 35 minutes (#7900)

* ci: limit each test attempt to 35 minutes

* ci: reword the timed-out attempt line in the CI guide
This commit is contained in:
Evgeny @ SimpleX Chat authored and GitHub committed 2026-10-29 22:08:01 +00:00
1 parent 094b1837d8
commit f2dd8b6231
3 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -655,7 +655,7 @@ jobs:
TESTS: ${{ github.event_name == 'workflow_dispatch' && inputs.tests || '' }}
PR_BODY: ${{ github.event.pull_request.draft == true && github.event.pull_request.body || '' }}
ATTEMPTS: ${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) && 3 || 1 }}
run: scripts/ci/run-tests.sh ./simplex-chat-test
run: scripts/ci/run-tests.sh timeout 35m ./simplex-chat-test
# Compiling the desktop and Android targets of :common in parallel exceeds the 2 GB Kotlin daemon heap.
# cmakeBuildAndCopy links the JNI library against libsimplex, which this job does not build.
+1 -1
View File
@@ -44,7 +44,7 @@ The reduced build runs one Linux job, build-linux (ubuntu-22.04 x86_64), for eve
- Docker image (step "Build and cache Docker image");
- caches (the steps "Restore ... from cache");
- `cabal build -j --enable-tests --ghc-options=-O0` (step "Build CLI");
- simplex-chat-test with the selected tests (step "Run tests").
- simplex-chat-test with the selected tests (step "Run tests"), each attempt limited to 35 minutes by `timeout`; an attempt that reaches the limit fails, and "Attempt <n> timed out." is printed.
- Local:
```sh
cp scripts/cabal.project.local.linux cabal.project.local
+4 -1
View File
@@ -26,7 +26,10 @@ attempts=${ATTEMPTS:-1}
while [ "$i" -le "$attempts" ]; do
if "$@" "${args[@]}"; then
break
elif [ "$i" -lt "$attempts" ]; then
elif [ "$?" -eq 124 ]; then
echo "Attempt $i timed out."
fi
if [ "$i" -lt "$attempts" ]; then
echo "Attempt $i failed, retrying..."
sleep 1
fi