Repository navigation
100 lines (85 loc) · 2.73 KB
/
Copy pathtest-quarantine.yml
File metadata and controls
100 lines (85 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Flaky Test Quarantine & Triage
on:
push:
branches: [master, main, develop]
paths:
- '.github/test-quarantine.json'
- 'scripts/flaky-test-quarantine.mjs'
pull_request:
branches: [master, main, develop]
paths:
- '.github/test-quarantine.json'
- 'scripts/flaky-test-quarantine.mjs'
schedule:
# Daily quarantine health audit and isolated pass streak verification — 04:00 UTC
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
action:
description: 'Quarantine Action to execute'
required: true
default: 'audit'
type: choice
options:
- audit
- verify-quarantined
- generate-report
concurrency:
group: test-quarantine-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: '24'
jobs:
quarantine-audit:
name: Quarantine Registry & Owner Audit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify Quarantine Policy & Owner Enforcement
run: node scripts/flaky-test-quarantine.mjs --check
- name: Generate Quarantine Triage Report
run: node scripts/flaky-test-quarantine.mjs --report
- name: Run Quarantine Manager Unit Tests
run: pnpm test tests/unit/flaky-test-quarantine.test.ts
isolated-quarantine-verify:
name: Isolated Quarantined Test Verification
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Quarantined Tests in Isolation
continue-on-error: true
run: |
FILTER=$(node scripts/flaky-test-quarantine.mjs --filter)
if [ -n "$FILTER" ]; then
echo "Executing quarantined tests under filter: $FILTER"
pnpm vitest run --testNamePattern "$FILTER" || true
else
echo "No active quarantined tests to verify."
fi