Add comprehensive CI workflow with linting, formatting, and coverage#10
Add comprehensive CI workflow with linting, formatting, and coverage#10alexgrozav merged 1 commit intomainfrom
Conversation
…checks Introduces GitHub Actions workflow that validates PRs and commits to main: - TypeScript strict mode typecheck (tsc --noEmit) - Linting with oxlint (1.51.0, 93 rules) - Code formatting check with oxfmt (0.36.0, Prettier-compatible) - Full test suite with coverage thresholds (99% lines/functions/statements, 95% branches) Also adds @types/node for proper Node.js type support and formats all source files with oxfmt. Runs on Node 20 and 22 (active LTS) across all PR and main branch pushes.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI pipeline and supporting configuration so PRs/pushes are gated by linting, formatting, typechecking, build, and Vitest coverage thresholds, alongside repo-wide formatting updates and new dev tooling dependencies.
Changes:
- Add CI workflow running lint/format/typecheck/build/test-with-coverage on Node 20/22.
- Configure Vitest coverage (v8 provider) with include/exclude rules and enforced thresholds.
- Add oxlint/oxfmt +
@types/nodeand apply formatting across source/tests/fixtures/benchmarks.
Reviewed changes
Copilot reviewed 52 out of 68 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Introduces CI job matrix and quality gates for lint/format/typecheck/build/test coverage. |
vitest.config.ts |
Adds coverage provider/config and thresholds; standardizes formatting. |
tsdown.config.ts |
Formatting-only updates for build config. |
tsconfig.json |
Excludes fixtures/benchmarks from TS project scope. |
package.json |
Adds lint/format/coverage scripts and new devDependencies. |
pnpm-lock.yaml |
Locks added tooling deps and updates dependency graph accordingly. |
README.md |
Formatting adjustments to tables/examples. |
src/index.ts |
Formatting-only updates. |
src/index.test.ts |
Formatting-only updates. |
src/resolver.ts |
Formatting-only updates. |
src/resolver.test.ts |
Formatting-only updates. |
src/scanner.ts |
Formatting-only updates. |
src/scanner.test.ts |
Formatting-only updates. |
src/types.ts |
Formatting-only updates (string literal unions). |
src/walker.ts |
Formatting-only updates (imports/quotes/signature). |
src/walker.test.ts |
Formatting-only updates. |
src/__benchmarks__/affected.bench.ts |
Formatting-only updates. |
src/__benchmarks__/comparisons.bench.ts |
Formatting-only updates. |
src/__benchmarks__/generate-fixtures.ts |
Formatting-only updates. |
src/__benchmarks__/importree.bench.ts |
Formatting-only updates. |
src/__benchmarks__/scanner.bench.ts |
Formatting-only updates. |
src/__tests__/fixtures/aliases/src/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/aliases/src/utils.ts |
Formatting-only updates. |
src/__tests__/fixtures/basic/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/chain/a.ts |
Formatting-only updates. |
src/__tests__/fixtures/chain/b.ts |
Formatting-only updates. |
src/__tests__/fixtures/circular/a.ts |
Formatting-only updates. |
src/__tests__/fixtures/circular/b.ts |
Formatting-only updates. |
src/__tests__/fixtures/comments/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/comments/real.ts |
Formatting-only updates. |
src/__tests__/fixtures/diamond/a.ts |
Formatting-only updates. |
src/__tests__/fixtures/diamond/b.ts |
Formatting-only updates. |
src/__tests__/fixtures/diamond/c.ts |
Formatting-only updates. |
src/__tests__/fixtures/dynamic/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/dynamic/lazy.ts |
Formatting-only updates. |
src/__tests__/fixtures/externals/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/externals/local.ts |
Formatting-only updates. |
src/__tests__/fixtures/index-resolution/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/index-resolution/utils/helper.ts |
Formatting-only updates. |
src/__tests__/fixtures/index-resolution/utils/index.ts |
Formatting-only updates. |
src/__tests__/fixtures/mixed/dynamic-dep.ts |
Formatting-only updates. |
src/__tests__/fixtures/mixed/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/mixed/reexport.ts |
Formatting-only updates. |
src/__tests__/fixtures/mixed/side-effect.ts |
Formatting-only updates. |
src/__tests__/fixtures/mixed/static-dep.ts |
Formatting-only updates. |
src/__tests__/fixtures/require-cjs/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/reexports/a.ts |
Formatting-only updates. |
src/__tests__/fixtures/reexports/b.ts |
Formatting-only updates. |
src/__tests__/fixtures/reexports/barrel.ts |
Formatting-only updates. |
src/__tests__/fixtures/reexports/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/strings/entry.ts |
Formatting-only updates. |
src/__tests__/fixtures/strings/real.ts |
Formatting-only updates. |
src/__tests__/fixtures/type-imports/entry.ts |
Formatting-only updates. |
coverage/index.html |
Adds generated HTML coverage report output. |
coverage/index.ts.html |
Adds generated HTML coverage report output. |
coverage/resolver.ts.html |
Adds generated HTML coverage report output. |
coverage/scanner.ts.html |
Adds generated HTML coverage report output. |
coverage/walker.ts.html |
Adds generated HTML coverage report output. |
coverage/clover.xml |
Adds generated XML coverage report output. |
coverage/base.css |
Adds generated coverage report asset. |
coverage/prettify.css |
Adds generated coverage report asset. |
coverage/prettify.js |
Adds generated coverage report asset. |
coverage/sorter.js |
Adds generated coverage report asset. |
coverage/block-navigation.js |
Adds generated coverage report asset. |
coverage/favicon.png |
Adds generated coverage report asset (binary). |
coverage/sort-arrow-sprite.png |
Adds generated coverage report asset (binary). |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "vitest": "^4.0.18" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" |
There was a problem hiding this comment.
engines.node still advertises >=18, but the newly added dev tooling (oxfmt/oxlint) requires Node ^20.19.0 || >=22.12.0 (per pnpm-lock). This can make local pnpm install / CI jobs fail or behave inconsistently for contributors on Node 18/early-20. Consider bumping the repo's required Node engine (and documenting it) or switching tooling to versions that support the stated Node range.
| "node": ">=18" | |
| "node": "^20.19.0 || >=22.12.0" |
Summary
Introduces GitHub Actions CI workflow that validates PRs and main branch pushes with strict quality gates:
Adds @types/node for proper Node.js type definitions and formats entire codebase with oxfmt.
Runs on Node 20 and 22 (active LTS) for maximum compatibility.
Test plan