Skip to content

Commit a61bffc

Browse files
mattleibowvCopilot
authored
Run the automation tooling tests in CI (#4939)
Three test suites live in the repository, pass, and are wired to no workflow, so a regression in any of them reaches main silently: .agents/skills/ci-status/scripts/tests/ 8 tests .agents/skills/update-skia/scripts/*_test.py 4 modules .github/scripts/tests/skia-sync-detect.test.sh The ci-status registry suite is the sharpest example. It exists to catch a dashboard that reports a workflow which is not there, but nothing ran it — so the guard itself was unguarded. Adds a workflow covering all three, scoped tightly to the paths that feed them plus any .github/workflows/*.yml edit, which is what makes the registry suite re-check its tracked list whenever a workflow is added, renamed or deleted. The ci-status suite is invoked directly rather than behind an existence check. On the runner's Python, unittest discover already fails loudly in both degenerate cases — exit 1 if the directory is gone, exit 5 on "NO TESTS RAN" if it is empty — so a wrapper could only convert those into a silent pass. The update-skia loop does need an explicit guard, because a glob that matches nothing would otherwise iterate zero times and succeed. Also registers the new workflow with the ci-status dashboard it runs, keeping coverage at 27 of 29. Co-authored-by: v <v@v.v> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 19826ce commit a61bffc

3 files changed

Lines changed: 83 additions & 1 deletion

File tree

.agents/skills/ci-status/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ standard Darc/Maestro stages.
8686
| Release - Milestones | mono/SkiaSharp | Workflow dispatch | Milestone reconciliation stops |
8787
| Update GitHub Release summaries | mono/SkiaSharp | Workflow dispatch | Release bodies go stale |
8888
| Release - Tooling Tests | mono/SkiaSharp | Push/PR to release tooling | Release scripts regress unnoticed |
89+
| Automation - Tooling Tests | mono/SkiaSharp | Push/PR to automation tooling | Automation scripts regress unnoticed |
8990
| PR - Backport | mono/SkiaSharp | PR label/comment | Cherry-picks to release branches fail |
9091
| PR - Rebase | mono/SkiaSharp | PR comment | PR rebase automation broken |
9192
| PR - Artifacts Comment | mono/SkiaSharp | Workflow run events | Build links not posted to PRs |
@@ -247,7 +248,7 @@ For each tracked GitHub Actions workflow:
247248
(broken = user-facing impact or release process blocked)
248249
- **Medium**: Sync - Docs Submodule, Sync - Skia Submodule, Fixer - Memory Leak, Fixer - Performance,
249250
Sync - Issue Triage, Sync - Issue Template Versions, Tests - Binding Generation Determinism,
250-
Release - Milestones, Update GitHub Release summaries,
251+
Automation - Tooling Tests, Release - Milestones, Update GitHub Release summaries,
251252
PR - Backport, Pages - Go Live! (broken = automation degraded, manual workaround exists)
252253
- **Low**: Pages - PR Staging - Cleanup, Pages - PR Staging - Sweep Stale, PR - Rebase, PR - Artifacts Comment,
253254
Merge Message, Track - Artifact Sizes, Track - Benchmarks,

.agents/skills/ci-status/scripts/ci-status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
{"repo": "mono/SkiaSharp", "workflow": "release-milestones.yml", "name": "Release - Milestones", "scope": "global", "trigger": "dispatch"},
9090
{"repo": "mono/SkiaSharp", "workflow": "update-github-release-summaries.yml", "name": "Update GitHub Release summaries", "scope": "global", "trigger": "dispatch"},
9191
{"repo": "mono/SkiaSharp", "workflow": "release-tooling-tests.yml", "name": "Release - Tooling Tests", "scope": "branch", "trigger": "push"},
92+
{"repo": "mono/SkiaSharp", "workflow": "automation-tooling-tests.yml", "name": "Automation - Tooling Tests", "scope": "branch", "trigger": "push"},
9293
# mono/SkiaSharp — PR Utilities (global: triggered by PR events, not branch-specific)
9394
{"repo": "mono/SkiaSharp", "workflow": "backport.yml", "name": "PR - Backport", "scope": "global", "trigger": "event"},
9495
{"repo": "mono/SkiaSharp", "workflow": "rebase.yml", "name": "PR - Rebase", "scope": "global", "trigger": "event"},
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Automation - Tooling Tests
2+
3+
# Runs the repository's non-release automation test suites. These all existed and passed
4+
# locally but were wired to no workflow, so a regression in them could reach `main`
5+
# silently:
6+
#
7+
# * .agents/skills/ci-status/scripts/tests/ — the CI dashboard's workflow registry
8+
# * .agents/skills/update-skia/scripts/*_test.py — Skia milestone update tooling
9+
# * .github/scripts/tests/skia-sync-detect.test.sh — the auto-skia-sync work detector
10+
#
11+
# Release publishing tooling is covered separately by release-tooling-tests.yml. Paths are
12+
# kept tight on purpose: this must not become a catch-all that runs on every change.
13+
14+
on:
15+
pull_request:
16+
paths:
17+
- ".agents/skills/ci-status/**"
18+
- ".agents/skills/update-skia/**"
19+
- ".github/scripts/**"
20+
# Any workflow edit, so the registry test re-checks its tracked list. '*.yml' already
21+
# covers the generated '*.lock.yml' files.
22+
- ".github/workflows/*.yml"
23+
push:
24+
branches: [main]
25+
paths:
26+
- ".agents/skills/ci-status/**"
27+
- ".agents/skills/update-skia/**"
28+
- ".github/scripts/**"
29+
- ".github/workflows/*.yml"
30+
workflow_dispatch:
31+
32+
permissions:
33+
contents: read
34+
35+
concurrency:
36+
group: automation-tooling-tests-${{ github.event.pull_request.number || github.ref }}
37+
cancel-in-progress: true
38+
39+
jobs:
40+
test:
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 15
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46+
47+
- name: Run ci-status workflow registry tests
48+
# Guards the CI dashboard against tracking workflows that no longer exist — a stale
49+
# entry does not error, it renders a GREEN row for a workflow that is not there.
50+
#
51+
# Called directly rather than behind an existence check: on the runner's Python
52+
# (3.12+) `unittest discover` fails loudly in both degenerate cases — exit 1
53+
# (ImportError) if the directory is gone, exit 5 ("NO TESTS RAN") if it is empty.
54+
# A guard here would only be able to turn those into a silent pass.
55+
run: |
56+
set -euo pipefail
57+
python3 -c "import yaml" 2>/dev/null \
58+
|| python3 -m pip install --quiet --break-system-packages pyyaml
59+
python3 -m unittest discover -s .agents/skills/ci-status/scripts/tests -p "test_*.py" -v
60+
61+
- name: Run update-skia tooling tests
62+
# These import their module under test by name, so they must run from their own
63+
# directory rather than through a repository-root discovery run.
64+
working-directory: .agents/skills/update-skia/scripts
65+
run: |
66+
set -euo pipefail
67+
shopt -s nullglob
68+
tests=(*_test.py)
69+
if [ ${#tests[@]} -eq 0 ]; then
70+
echo "::error::No *_test.py found — the update-skia tests moved or were renamed."
71+
exit 1
72+
fi
73+
for test in "${tests[@]}"; do
74+
echo "::group::$test"
75+
python3 -m unittest "${test%.py}"
76+
echo "::endgroup::"
77+
done
78+
79+
- name: Run skia-sync work detector tests
80+
run: bash .github/scripts/tests/skia-sync-detect.test.sh

0 commit comments

Comments
 (0)