ci: run test suite + comment coverage#1
Merged
Merged
Conversation
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>
Coverage Report
File CoverageNo changed files found. |
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wat
Voegt een GitHub Actions workflow (
.github/workflows/ci.yml) toe die:mainDetails
npm ci(lockfile)vitest run --coveragemetjson+json-summaryreporters (nodig voor het comment), plustext-summaryvoor leesbare logs--coverage.reportOnFailurezodat het comment ook verschijnt als thresholds (95%) zouden falendavelosert/vitest-coverage-report-action; op pushes naar main is er geen PR, dan landt het rapport in de job summaryTest
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