Add CI: run tests and lint on every PR - #280
Merged
Merged
Conversation
- Add vitest as a dev dependency with a test script; the existing vitest test files (tax calculators, sankey transform) were never runnable because no test runner was installed - Add vitest.config.mts to resolve the @/ path alias - Add GitHub Actions workflow running tests and lint on pushes to main and on all pull requests
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.
Summary
The repo had vitest test files (Ontario/Quebec tax calculators, spending categories, sankey transform — 60 tests) but no test runner installed and no CI, so nothing ever ran them. This PR makes them run and show up as checks on every PR.
vitestas a dev dependency withtest/test:watchscriptsvitest.config.mtsto resolve the@/path alias used by the code under test.github/workflows/ci.yml) with Test and Lint jobs on all pull requests and pushes tomainCloudflare deployment
The Cloudflare Workers deployment was removed on the Cloudflare side (the
canadaspendsworker and its git-connected build).mainwas verified clean — no wrangler/OpenNext config, scripts, or lockfile entries exist on this branch. The only in-repo Cloudflare artifacts live on the unmergedfeat/supabase-auth-posthogbranch.Testing
pnpm test— 60 tests pass in 4 filespnpm lint— exits 0 (pre-existing warnings only)