Skip to content

Commit bac6795

Browse files
committed
add filter condition
1 parent 2abb766 commit bac6795

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

scripts/slowest_tests/update-slowest-times-issue.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,41 @@ workflow=Tests
1010
latest_id=$(gh run list --workflow $workflow --status success --limit 1 --json databaseId --jq '.[0].databaseId')
1111
jobs=$(gh api /repos/$owner/$repo/actions/runs/$latest_id/jobs --jq '.jobs | map({name: .name, run_id: .run_id, id: .id})')
1212

13+
# Skip 3.10, float32, and Benchmark tests
14+
function skip_job() {
15+
name=$1
16+
if [[ $name == *"py3.10"* ]]; then
17+
return 0
18+
fi
19+
20+
if [[ $name == *"float32 1"* ]]; then
21+
return 0
22+
fi
23+
24+
if [[ $name == *"Benchmark"* ]]; then
25+
return 0
26+
fi
27+
28+
return 1
29+
}
30+
1331
all_times=""
1432
echo "$jobs" | jq -c '.[]' | while read -r job; do
1533
id=$(echo $job | jq -r '.id')
1634
name=$(echo $job | jq -r '.name')
1735
run_id=$(echo $job | jq -r '.run_id')
1836

37+
if skip_job $name; then
38+
echo "Skipping $name"
39+
continue
40+
fi
41+
1942
echo "Processing job: $name (ID: $id, Run ID: $run_id)"
2043
times=$(gh run view --job $id --log | python extract-slow-tests.py)
2144

2245
if [ -z "$times" ]; then
2346
# Some of the jobs are non-test jobs, so we skip them
47+
echo "No tests found for '$name', skipping"
2448
continue
2549
fi
2650

0 commit comments

Comments
 (0)