Skip to content

feat: add Lighthouse CI for quality scoring#221

Merged
braboj merged 13 commits intomainfrom
feature/lighthouse-ci
Apr 27, 2026
Merged

feat: add Lighthouse CI for quality scoring#221
braboj merged 13 commits intomainfrom
feature/lighthouse-ci

Conversation

@braboj
Copy link
Copy Markdown
Owner

@braboj braboj commented Apr 26, 2026

Summary

  • Add Lighthouse CI workflow that runs on every PR
  • Audits 4 pages: home, introduction, building blocks, branching
  • Accessibility < 90 blocks merge (error)
  • Performance, best practices, SEO < 90 warn
  • Results uploaded as artifacts + temporary public storage (shareable report link)

Test plan

  • Lighthouse CI workflow runs successfully on this PR
  • Report link appears in PR checks

🤖 Generated with Claude Code

braboj and others added 11 commits April 26, 2026 17:14
Audits 4 pages on every PR: performance, accessibility, best practices,
SEO. Accessibility < 90 blocks merge; others warn at < 90.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The static server serves from dist/ directly, so URLs should not
include the base path prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SonarCloud flagged temporary-public-storage as a security hotspot.
Reports are still available as GitHub Actions artifacts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the GitHub App integration with a CI-based scan.
Scans astro-site/src on every PR and push to main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v5 has a known security vulnerability per SonarSource advisory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SonarCloud needs node_modules to resolve tsconfig references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reads JSON reports from .lighthouseci/ and posts a table with
per-page scores for performance, accessibility, best practices,
and SEO. Updates existing comment on re-runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use finalDisplayedUrl as primary, fall back to finalUrl, requestedUrl,
then filename. Guard against non-http values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lighthouse CI may wrap reports under .lhr key. Skip files without
categories to avoid errors on manifest or other metadata files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep simple workflow — scores available via artifacts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodeQL is GitHub-native, free for all repos (public and private),
and aligns with the quality gates template in solid-ai-templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Repository owner deleted a comment from github-actions Bot Apr 27, 2026
Repository owner deleted a comment from sonarqubecloud Bot Apr 27, 2026
braboj and others added 2 commits April 27, 2026 11:49
Resolves CodeQL alert: workflows without explicit permissions run
with broad defaults. Restrict to contents:read.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitHub's default CodeQL setup is already enabled and covers
JavaScript/TypeScript and Actions. Custom workflow conflicts
with the default setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@braboj braboj merged commit 8463e24 into main Apr 27, 2026
5 checks passed
@braboj braboj deleted the feature/lighthouse-ci branch April 27, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants