Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/find-test-failures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Find test failures

on:
workflow_dispatch:
inputs:
search_term:
description: 'Substring or /regex/ matched against the failing test title and spec-file path'
type: string
required: true
job:
description: 'Only scan jobs whose name matches (substring or /regex/), e.g. lowLevel or sentinel or core'
type: string
default: ''
branch:
description: 'Only scan runs on this branch (empty = all branches)'
type: string
default: ''
since:
description: 'Only runs created on/after this date (YYYY-MM-DD)'
type: string
default: ''
limit:
description: 'Max number of runs to scan'
type: string
default: '100'
scan_all:
description: 'Also scan green runs / passing jobs (catches flaky-recovered failures)'
type: boolean
default: false

permissions:
contents: read
actions: read

jobs:
find_test_failures:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Use Node 24
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # zizmor: ignore[cache-poisoning]
with:
node-version: 24
- name: Run failure scanner
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_TERM: ${{ github.event.inputs.search_term }}
JOB: ${{ github.event.inputs.job }}
BRANCH: ${{ github.event.inputs.branch }}
SINCE: ${{ github.event.inputs.since }}
LIMIT: ${{ github.event.inputs.limit }}
SCAN_ALL: ${{ github.event.inputs.scan_all }}
run: |
args=("$SEARCH_TERM" --repo "$GITHUB_REPOSITORY" --limit "$LIMIT")
[ -n "$JOB" ] && args+=(--job "$JOB")
[ -n "$BRANCH" ] && args+=(--branch "$BRANCH")
[ -n "$SINCE" ] && args+=(--since "$SINCE")
[ "$SCAN_ALL" = "true" ] && args+=(--scan-all)
{
echo '```'
node scripts/ci/find-test-failures.js "${args[@]}"
echo '```'
} | tee -a "$GITHUB_STEP_SUMMARY"
Comment thread
dianabarsan marked this conversation as resolved.
Loading