Skip to content

Commit abb5168

Browse files
authored
Merge pull request #143 from mgifford/copilot/review-github-actions-guidance
ci: add CI workflow, upgrade accessibility scanner to v3, remove redundant triggers
2 parents 1f04d40 + 965fa35 commit abb5168

File tree

4 files changed

+49
-10
lines changed

4 files changed

+49
-10
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- 'docs/**'
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '24'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run tests
31+
run: npm test

.github/workflows/daily-scan.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ jobs:
7676
- name: Install dependencies
7777
run: npm ci
7878

79-
- name: Run tests
80-
run: npm test
81-
8279
- name: Run pipeline
8380
id: pipeline
8481
shell: bash

.github/workflows/scan-github-pages.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ on:
44
schedule:
55
# Run on the first day of every month at 09:00 UTC
66
- cron: '0 9 1 * *'
7-
push:
8-
branches:
9-
- main
10-
paths:
11-
- 'docs/**'
127
workflow_dispatch:
138

149
permissions:
15-
contents: write
10+
contents: read
1611
issues: write
1712

1813
jobs:
1914
scan-pages:
2015
runs-on: ubuntu-latest
2116
steps:
17+
- name: Check for existing open accessibility issues
18+
id: check_issues
19+
env:
20+
GH_TOKEN: ${{ github.token }}
21+
run: |
22+
COUNT=$(gh issue list --repo "$GITHUB_REPOSITORY" --label "accessibility" --state open --json number --jq '. | length')
23+
echo "open_count=$COUNT" >> "$GITHUB_OUTPUT"
24+
2225
- name: Scan GitHub Pages with axe-core
23-
uses: github/accessibility-scanner@v2
26+
if: steps.check_issues.outputs.open_count == '0'
27+
uses: github/accessibility-scanner@v3
2428
with:
2529
urls: |
2630
https://mgifford.github.io/daily-dap/
@@ -29,3 +33,9 @@ jobs:
2933
token: ${{ github.token }}
3034
cache_key: daily-dap-github-pages
3135
skip_copilot_assignment: true
36+
37+
- name: Skip scan (open issues exist)
38+
if: steps.check_issues.outputs.open_count != '0'
39+
run: |
40+
echo "Skipping scan: ${{ steps.check_issues.outputs.open_count }} open accessibility issue(s) already exist."
41+
echo "Resolve open issues before a new scan is triggered."

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ This project is transparent about how AI tools have been used throughout its dev
125125
| Claude (Anthropic) | claude-sonnet-4-5 | Added required federal links checker (OMB M-17-06): detects Privacy Policy, Contact, and FOIA pages, inspired by the performance.gov website performance initiative |
126126
| Claude (Anthropic) | claude-sonnet-4.6 | Created STYLES.md: design and content standards aligned with CivicActions brand, colors, typography, and style guide conventions; added STYLES.md link to README documentation section |
127127
| Claude (Anthropic) | claude-sonnet-4.6 | CivicActions brand alignment: updated CSS color tokens (primary red #D83933, dark blue #162E51, secondary blue #1A4480), font stack (Public Sans), footer attribution, and tests in render-pages.js and index.html |
128+
| Claude (Anthropic) | claude-sonnet-4.6 | CI/CD improvements: added dedicated CI workflow for tests on PRs, upgraded accessibility scanner to v3, removed redundant push trigger from scan-github-pages workflow, added open-issues gate to prevent alert fatigue |
128129

129130
### Runtime operation
130131

0 commit comments

Comments
 (0)