Skip to content

Commit

Permalink
ci: deal better with hanging tests
Browse files Browse the repository at this point in the history
Exactly like we just did with the `win test` jobs, let's establish
timeouts for the other jobs that run Git's test suite (giving the ASAN
and macOS jobs 60 minutes, all other jobs 20 minutes to finish, which is
generous), and detect timed-out tests and handle them the same as failed
ones.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Dec 19, 2023
1 parent 1cc034d commit 714179d
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,21 @@ jobs:
shell: bash
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
- name: test
id: test
shell: bash
timeout-minutes: 20
env:
NO_SVN_TESTS: 1
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
- name: handle timed-out tests
if: failure() && steps.test.outcome == 'failure' && env.FAILED_TEST_ARTIFACTS == ''
shell: bash
run: . /etc/profile && . ci/lib.sh && { handle_failed_tests || test $? = 1; }
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
shell: bash
run: ci/print-test-failures.sh
- name: Upload failed tests' directories
- name: Upload failed/timed-out tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -306,10 +312,15 @@ jobs:
- uses: actions/checkout@v3
- run: ci/install-dependencies.sh
- run: ci/run-build-and-tests.sh
id: test
timeout-minutes: ${{ (matrix.vector.jobname == 'linux-asan-ubsan' || startsWith(matrix.vector.pool, 'macos')) && 60 || 20 }}
- name: handle timed-out tests
if: failure() && steps.test.outcome == 'failure' && env.FAILED_TEST_ARTIFACTS == ''
run: . /etc/profile && . ci/lib.sh && { handle_failed_tests || test $? = 1; }
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
run: ci/print-test-failures.sh
- name: Upload failed tests' directories
- name: Upload failed/timed-out tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -343,10 +354,15 @@ jobs:
if: matrix.vector.jobname == 'linux32'
- run: ci/install-docker-dependencies.sh
- run: ci/run-build-and-tests.sh
id: test
timeout-minutes: 20
- name: handle timed-out tests
if: failure() && steps.test.outcome == 'failure' && env.FAILED_TEST_ARTIFACTS == ''
run: . /etc/profile && . ci/lib.sh && { handle_failed_tests || test $? = 1; }
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
run: ci/print-test-failures.sh
- name: Upload failed tests' directories
- name: Upload failed/timed-out tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 714179d

Please sign in to comment.