[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: split a11y tests using matrix (#819)

authored by

Wojciech Maj and committed by
GitHub
dcbb0d69 5f105bbb

+20 -8
+5 -1
.github/workflows/ci.yml
··· 92 92 93 93 a11y: 94 94 runs-on: ubuntu-latest 95 + strategy: 96 + matrix: 97 + mode: [dark, light] 95 98 96 99 steps: 97 100 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 ··· 111 114 - name: 🏗️ Build project 112 115 run: pnpm build 113 116 114 - - name: ♿ Accessibility audit (Lighthouse - dark & light mode) 117 + - name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode) 115 118 run: ./scripts/lighthouse-a11y.sh 116 119 env: 117 120 LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} 121 + LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }} 118 122 119 123 knip: 120 124 runs-on: ubuntu-latest
+15 -7
scripts/lighthouse-a11y.sh
··· 7 7 8 8 set -e 9 9 10 - echo "🌙 Running Lighthouse accessibility audit (dark mode)..." 11 - LIGHTHOUSE_COLOR_MODE=dark pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/dark" 12 - 13 - echo "" 14 - echo "☀️ Running Lighthouse accessibility audit (light mode)..." 15 - LIGHTHOUSE_COLOR_MODE=light pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/light" 10 + case "${LIGHTHOUSE_COLOR_MODE}" in 11 + dark) 12 + echo "🌙 Running Lighthouse accessibility audit (dark mode)..." 13 + pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/dark" 14 + ;; 15 + light) 16 + echo "☀️ Running Lighthouse accessibility audit (light mode)..." 17 + pnpx @lhci/cli autorun --upload.githubStatusContextSuffix="/light" 18 + ;; 19 + *) 20 + echo "⚠️ Missing or invalid LIGHTHOUSE_COLOR_MODE. Use 'dark' or 'light'." 21 + exit 1 22 + ;; 23 + esac 16 24 17 25 echo "" 18 - echo "✅ Accessibility audits completed for both color modes" 26 + echo "✅ Accessibility audit completed"