Skip to content

Commit d22b484

Browse files
CopilotradicalCopilot
authored
Move run-test-repeatedly scripts to .github/workflows/fix-flaky-test/ (#14704)
* Initial plan * Move run-test-repeatedly scripts to .github/workflows/fix-flaky-test Co-authored-by: radical <1472+radical@users.noreply.github.com> * Update .github/skills/fix-flaky-test/SKILL.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add ./ prefix to script paths in SKILL.md for copy-paste friendliness Co-authored-by: radical <1472+radical@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: radical <1472+radical@users.noreply.github.com> Co-authored-by: Ankit Jain <radical@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent edf8ca2 commit d22b484

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/skills/fix-flaky-test/SKILL.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ dotnet build tests/<TestProject>.Tests/<TestProject>.Tests.csproj -v:q
252252

253253
### 2.3: Run with run-test-repeatedly script
254254

255-
Use the `run-test-repeatedly.sh` (Linux/macOS) or `run-test-repeatedly.ps1` (Windows) script at the repo root. It runs the test command repeatedly with process cleanup between iterations.
255+
Use the `run-test-repeatedly.sh` (Linux/macOS) or `run-test-repeatedly.ps1` (Windows) script in `.github/workflows/fix-flaky-test/`. It runs the test command repeatedly with process cleanup between iterations.
256256

257257
**Linux/macOS:**
258258

259259
```bash
260260
# Basic usage — run a single test 20 times (stop on first failure)
261-
./run-test-repeatedly.sh -n 20 -- \
261+
./.github/workflows/fix-flaky-test/run-test-repeatedly.sh -n 20 -- \
262262
dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build \
263263
-- --filter-method "*.<TestMethodName>" \
264264
--filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
@@ -268,7 +268,7 @@ Use the `run-test-repeatedly.sh` (Linux/macOS) or `run-test-repeatedly.ps1` (Win
268268

269269
```powershell
270270
# Basic usage — run a single test 20 times (stop on first failure)
271-
./run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build `
271+
./.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build `
272272
-- --filter-method "*.<TestMethodName>" `
273273
--filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
274274
```
@@ -279,12 +279,12 @@ Use the `run-test-repeatedly.sh` (Linux/macOS) or `run-test-repeatedly.ps1` (Win
279279
dotnet build tests/<TestProject>.Tests/<TestProject>.Tests.csproj -v:q /p:RunQuarantinedTests=true
280280

281281
# Linux/macOS
282-
./run-test-repeatedly.sh -n 20 -- \
282+
./.github/workflows/fix-flaky-test/run-test-repeatedly.sh -n 20 -- \
283283
dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build \
284284
-- --filter-method "*.<TestMethodName>"
285285

286286
# Windows (PowerShell)
287-
./run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build `
287+
./.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build `
288288
-- --filter-method "*.<TestMethodName>"
289289
```
290290

@@ -571,11 +571,11 @@ dotnet build tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-restore -
571571
572572
# Quick local check — same iteration count as reproduction
573573
# Linux/macOS:
574-
./run-test-repeatedly.sh -n 20 -- \
574+
./.github/workflows/fix-flaky-test/run-test-repeatedly.sh -n 20 -- \
575575
dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build \
576576
-- --filter-method "*.<TestMethodName>"
577577
# Windows (PowerShell):
578-
# ./run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build -- --filter-method "*.<TestMethodName>"
578+
# ./.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 20 -- dotnet test tests/<TestProject>.Tests/<TestProject>.Tests.csproj --no-build -- --filter-method "*.<TestMethodName>"
579579
```
580580
581581
If local verification fails, iterate on the fix before going to CI. This saves ~30 minutes per CI round-trip.

run-test-repeatedly.ps1 renamed to .github/workflows/fix-flaky-test/run-test-repeatedly.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
(direct invocation from a PowerShell prompt).
1616
1717
.EXAMPLE
18-
./run-test-repeatedly.ps1 -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build -- --filter-method "*.MyTest"
18+
.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build -- --filter-method "*.MyTest"
1919
2020
.EXAMPLE
21-
./run-test-repeatedly.ps1 -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
21+
.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
2222
#>
2323

2424
# ---------- defaults ----------
@@ -46,7 +46,7 @@ $i = 0
4646
}
4747
'--help' {
4848
Write-Host @"
49-
Usage: ./run-test-repeatedly.ps1 [OPTIONS] -- <test command...>
49+
Usage: .github/workflows/fix-flaky-test/run-test-repeatedly.ps1 [OPTIONS] -- <test command...>
5050
5151
Runs <test command> repeatedly to validate flaky test fixes.
5252
Everything after '--' is executed verbatim each iteration.
@@ -57,8 +57,8 @@ Options:
5757
--help Show this help message
5858
5959
Examples:
60-
./run-test-repeatedly.ps1 -n 20 -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj -- --filter-method "*.MyTest"
61-
./run-test-repeatedly.ps1 -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
60+
.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 20 -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj -- --filter-method "*.MyTest"
61+
.github/workflows/fix-flaky-test/run-test-repeatedly.ps1 -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
6262
"@
6363
exit 0
6464
}

run-test-repeatedly.sh renamed to .github/workflows/fix-flaky-test/run-test-repeatedly.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ STOP_ON_FAILURE=true
1212
# ---------- usage ----------
1313
usage() {
1414
cat <<'EOF'
15-
Usage: ./run-test-repeatedly.sh [OPTIONS] -- <test command...>
15+
Usage: .github/workflows/fix-flaky-test/run-test-repeatedly.sh [OPTIONS] -- <test command...>
1616
1717
Runs <test command> repeatedly to validate flaky test fixes.
1818
Everything after '--' is executed verbatim each iteration.
@@ -23,8 +23,8 @@ Options:
2323
--help Show this help message
2424
2525
Examples:
26-
./run-test-repeatedly.sh -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build -- --filter-method "*.MyTest"
27-
./run-test-repeatedly.sh -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
26+
.github/workflows/fix-flaky-test/run-test-repeatedly.sh -- dotnet test tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-build -- --filter-method "*.MyTest"
27+
.github/workflows/fix-flaky-test/run-test-repeatedly.sh -n 50 --run-all -- dotnet test tests/Foo/Foo.csproj -- --filter-method "*.Bar"
2828
EOF
2929
exit 0
3030
}

0 commit comments

Comments
 (0)