Skip to content

Commit 1929cae

Browse files
committed
chore: 전체 테스트를 반복하는 스크립트 추가
1 parent b51872a commit 1929cae

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Full Test Suite Repeat
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
repeat_count:
7+
description: '전체 테스트를 반복할 횟수'
8+
required: true
9+
default: '10'
10+
11+
jobs:
12+
repeat-test:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
checks: write
17+
18+
steps:
19+
- name: Checkout the code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up JDK 21
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: '21'
26+
distribution: 'temurin'
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@v4
30+
31+
- name: Make Gradle wrapper executable
32+
run: chmod +x ./gradlew
33+
34+
- name: Run full test suite N times
35+
run: |
36+
set +e
37+
REPEAT_COUNT="${{ github.event.inputs.repeat_count }}"
38+
FAIL_COUNT=0
39+
for i in $(seq 1 "$REPEAT_COUNT"); do
40+
echo "=== Run $i/$REPEAT_COUNT ==="
41+
./gradlew test --rerun-tasks
42+
STATUS=$?
43+
mkdir -p "build/repeat-test-results/run-$i"
44+
cp -r build/test-results/test/. "build/repeat-test-results/run-$i/" 2>/dev/null || true
45+
if [ $STATUS -ne 0 ]; then
46+
FAIL_COUNT=$((FAIL_COUNT + 1))
47+
echo "Run $i FAILED"
48+
fi
49+
done
50+
echo "Total failures: $FAIL_COUNT / $REPEAT_COUNT"
51+
if [ "$FAIL_COUNT" -ne 0 ]; then
52+
exit 1
53+
fi
54+
55+
- name: Publish Test Report
56+
uses: mikepenz/action-junit-report@v5
57+
if: success() || failure()
58+
with:
59+
report_paths: 'build/repeat-test-results/**/TEST-*.xml'

0 commit comments

Comments
 (0)