Skip to content

ci: run test suite + comment coverage#1

Merged
guuse merged 2 commits into
mainfrom
ci/test-coverage
May 31, 2026
Merged

ci: run test suite + comment coverage#1
guuse merged 2 commits into
mainfrom
ci/test-coverage

Conversation

@guuse
Copy link
Copy Markdown
Owner

@guuse guuse commented May 31, 2026

Wat

Voegt een GitHub Actions workflow (.github/workflows/ci.yml) toe die:

  • de Vitest-suite draait met v8 coverage
  • de coverage als sticky PR-comment post en naar de job summary schrijft
  • triggert op pull requests én pushes naar main

Details

  • Node 22 + npm ci (lockfile)
  • vitest run --coverage met json + json-summary reporters (nodig voor het comment), plus text-summary voor leesbare logs
  • --coverage.reportOnFailure zodat het comment ook verschijnt als thresholds (95%) zouden falen
  • coverage-comment via davelosert/vitest-coverage-report-action; op pushes naar main is er geen PR, dan landt het rapport in de job summary

Test

Lokaal: 806 tests groen, coverage 99.6% statements / 98.4% branches / 100% functions. Deze PR dient meteen als live-test van de workflow zelf.

🤖 Generated with Claude Code

Adds a GitHub Actions workflow that runs the Vitest suite with v8
coverage on every pull request and on pushes to main. The coverage
report is posted as a sticky PR comment and written to the job
summary via davelosert/vitest-coverage-report-action.

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

github-actions Bot commented May 31, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 99.95% (🎯 95%) 2447 / 2448
🔵 Statements 99.64% (🎯 95%) 2783 / 2793
🔵 Functions 100% (🎯 95%) 705 / 705
🔵 Branches 98.35% (🎯 95%) 1557 / 1583
File CoverageNo changed files found.
Generated in workflow #2 for commit 1efa87a by the Vitest Coverage Report Action

AccountSettings tests asserted createSimplicateRepository was called with
a base URL (expect.anything()), but that URL comes from
import.meta.env.VITE_SIMPLICATE_BASE_URL. Locally a gitignored .env
supplied it; on CI (no .env) it was undefined, failing the assertion.

Pin a deterministic fallback in the global test setup so unit tests no
longer depend on a local .env. A real env value still takes precedence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@guuse guuse merged commit 5de9fa2 into main May 31, 2026
1 check passed
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.

1 participant