Skip to content

Check system libraries build with CI/CD #924

Check system libraries build with CI/CD

Check system libraries build with CI/CD #924

Workflow file for this run

name: Accessibility Check
on:
pull_request:
branches: ["**"]
permissions:
pull-requests: write # needed to post the summary comment; read-only on fork PRs (step gracefully skips)
jobs:
a11y-check:
name: Qt Accessibility Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.12"
- name: Get changed src/gui/ files
run: |
git diff --name-only origin/${{ github.base_ref }}...HEAD \
| grep -E '^src/gui/.*\.(cpp|h)$' \
> /tmp/changed_gui_files.txt || true
echo "Changed src/gui files:"
cat /tmp/changed_gui_files.txt || echo "(none)"
- name: Run accessibility check
id: a11y
run: |
FILES=$(cat /tmp/changed_gui_files.txt | tr '\n' ' ')
if [ -z "$FILES" ]; then
echo "No src/gui/ files changed -- skipping."
echo "findings=0" >> $GITHUB_OUTPUT
exit 0
fi
python tools/check_a11y.py $FILES | tee /tmp/a11y_output.txt
COUNT=$(grep -c "^::warning" /tmp/a11y_output.txt || true)
echo "findings=$COUNT" >> $GITHUB_OUTPUT
# Post a summary comment so the finding count is visible at the PR top
# level (the per-line annotations appear on the diff itself).
# continue-on-error: true because fork PRs have a read-only GITHUB_TOKEN
# and the comment step would otherwise fail -- the inline annotations
# appear on the diff regardless.
#
# NOTE: this workflow intentionally does NOT auto-apply the
# aetherclaude-eligible label. Per AGENTS.md and CONSTITUTION.md
# (Principle X), that label is the issue-level claim mechanism that
# gates AetherClaude implementation work — applying it to PRs would
# repurpose the label off-spec and trigger AetherClaude to write
# remediation patches on community contributors' open PRs without
# their consent. Accessibility remediation should be picked up via a
# follow-up issue (e.g. #3288), not by side-effect of opening a PR.
- name: Comment with accessibility summary
if: steps.a11y.outputs.findings != '0'
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SUMMARY=$(grep -E "(Files scanned|Files with findings|Total findings)" \
/tmp/a11y_output.txt | sed 's/^/> /' || echo "")
cat > /tmp/a11y_comment.md << COMMENTEOF
## Accessibility check findings
This PR touches \`src/gui/\` files with **${{ steps.a11y.outputs.findings }}** accessibility issue(s).
Full details appear as inline annotations on the diff above.
${SUMMARY}
See [\`docs/a11y.md\`](docs/a11y.md) for the canonical
Qt patterns (\`setAccessibleName\`, \`QAccessibleValueChangeEvent\`,
\`QAccessibleInterface\` subclasses, etc.). Structural remediation
(keyboard navigation, custom \`QAccessibleInterface\` subclasses)
is tracked in #3288.
*Findings are warnings only — the build is not blocked.*
COMMENTEOF
gh pr comment ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--body-file /tmp/a11y_comment.md