mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-10-25 15:45:58 +01:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed5ef82e95
|
||
|
|
af8affda8c |
No files matched your search
@@ -32,6 +32,9 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test (Java 21, headless)
|
name: Test (Java 21, headless)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# A healthy run takes about four minutes. The per-test limit in build.gradle.kts names
|
||||||
|
# a hanging test; this cap covers a hang outside any test, such as in Gradle itself.
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -108,8 +111,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Also on cancelled(): the job timeout cancels a hanging run, and the reports of the
|
||||||
|
# classes that did finish carry the timed-out tests' full stacks.
|
||||||
- name: Keep the test reports on a failure
|
- name: Keep the test reports on a failure
|
||||||
if: failure()
|
if: failure() || cancelled()
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-results
|
||||||
|
|||||||
@@ -155,6 +155,9 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test (Java 21, headless)
|
name: Test (Java 21, headless)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# A healthy run takes about four minutes. The per-test limit in build.gradle.kts names
|
||||||
|
# a hanging test; this cap covers a hang outside any test, such as in Gradle itself.
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -283,8 +286,10 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
# Also on cancelled(): the job timeout cancels a hanging run, and the reports of the
|
||||||
|
# classes that did finish carry the timed-out tests' full stacks.
|
||||||
- name: Keep the test reports on a failure
|
- name: Keep the test reports on a failure
|
||||||
if: failure()
|
if: failure() || cancelled()
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-results
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test (Java 21, headless)
|
name: Test (Java 21, headless)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# A healthy run takes about four minutes. The per-test limit in build.gradle.kts names
|
||||||
|
# a hanging test; this cap covers a hang outside any test, such as in Gradle itself.
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -127,8 +130,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Also on cancelled(): the job timeout cancels a hanging run, and the reports of the
|
||||||
|
# classes that did finish carry the timed-out tests' full stacks.
|
||||||
- name: Keep the test reports on a failure
|
- name: Keep the test reports on a failure
|
||||||
if: failure()
|
if: failure() || cancelled()
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-results
|
||||||
|
|||||||
@@ -141,6 +141,21 @@ subprojects {
|
|||||||
}
|
}
|
||||||
testUserHome.mkdirs()
|
testUserHome.mkdirs()
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* A test that never returns must fail by name instead of holding the job until
|
||||||
|
* GitHub kills it after six hours: Nightly #302 hung in :app-desktop:test for over
|
||||||
|
* an hour, and the log named only the task. The limit is far above the slowest test
|
||||||
|
* (under four seconds). SEPARATE_THREAD also ends a test whose thread ignores
|
||||||
|
* interruption, such as a busy loop or a blocked native call, and the failure's
|
||||||
|
* cause carries that thread's stack, so it shows where the test stood.
|
||||||
|
*/
|
||||||
|
systemProperty("junit.jupiter.execution.timeout.default", "2m")
|
||||||
|
systemProperty("junit.jupiter.execution.timeout.thread.mode.default", "SEPARATE_THREAD")
|
||||||
|
// The default short format prints only the first frame of each cause, which for a
|
||||||
|
// timed-out test is the line it hung in but not the call that blocked there.
|
||||||
|
testLogging {
|
||||||
|
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
||||||
|
}
|
||||||
finalizedBy(checkTestUserHome)
|
finalizedBy(checkTestUserHome)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user