Nightly Quality Audit #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Quality Audit | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' # Daily at 6 AM UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - run: npm install | |
| - run: npx playwright install --with-deps | |
| - name: Start server | |
| run: npx http-server . -p 8080 -s & | |
| - name: Wait for server | |
| run: npx wait-on http://localhost:8080 --timeout 15000 | |
| - name: Run all tests | |
| run: npx playwright test tests/ --project=chromium --reporter=list,html | |
| continue-on-error: true | |
| - name: Link check | |
| run: | | |
| npx linkinator http://localhost:8080 \ | |
| --recurse \ | |
| --skip "github.com|googletagmanager" \ | |
| --timeout 10000 \ | |
| --format json > link-report.json || true | |
| echo "### Link Check Results" >> $GITHUB_STEP_SUMMARY | |
| node -e " | |
| const r = require('./link-report.json'); | |
| const broken = (r.links || []).filter(l => l.state === 'BROKEN'); | |
| console.log('Total links: ' + (r.links || []).length); | |
| console.log('Broken: ' + broken.length); | |
| if (broken.length) { | |
| broken.forEach(l => console.log(' BROKEN: ' + l.url + ' (from ' + l.parent + ')')); | |
| } | |
| " >> $GITHUB_STEP_SUMMARY | |
| - name: Lighthouse audit | |
| run: | | |
| npm install -g @lhci/cli | |
| lhci collect \ | |
| --url=http://localhost:8080/index.html \ | |
| --url=http://localhost:8080/getting-started.html \ | |
| --url=http://localhost:8080/docs/index.html \ | |
| --settings.preset=desktop \ | |
| --numberOfRuns=1 || true | |
| echo "### Lighthouse Audit Complete" >> $GITHUB_STEP_SUMMARY | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: nightly-reports-${{ github.run_number }} | |
| path: | | |
| playwright-report/ | |
| link-report.json | |
| .lighthouseci/ | |
| retention-days: 30 |