Skip to content

Add comprehensive CI workflow with linting, formatting, and coverage#10

Merged
alexgrozav merged 1 commit intomainfrom
alexgrozav/add-ci-workflow
Mar 8, 2026
Merged

Add comprehensive CI workflow with linting, formatting, and coverage#10
alexgrozav merged 1 commit intomainfrom
alexgrozav/add-ci-workflow

Conversation

@alexgrozav
Copy link
Copy Markdown
Owner

Summary

Introduces GitHub Actions CI workflow that validates PRs and main branch pushes with strict quality gates:

  • Linting: oxlint with 93 built-in rules for code correctness
  • Formatting: oxfmt (Prettier-compatible) to enforce consistent style
  • Type checking: TypeScript strict mode with isolatedDeclarations
  • Test coverage: 67 tests with enforced thresholds (99% lines/functions/statements, 95% branches)

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

  • PR workflow runs on all PRs targeting main
  • Push workflow runs on commits to main
  • Coverage thresholds enforced: 99% lines, 99% functions, 99% statements, 95% branches
  • All 67 tests pass with comprehensive coverage

…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.
Copilot AI review requested due to automatic review settings March 8, 2026 10:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/node and 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.

Comment thread package.json
"vitest": "^4.0.18"
},
"engines": {
"node": ">=18"
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"node": ">=18"
"node": "^20.19.0 || >=22.12.0"

Copilot uses AI. Check for mistakes.
@alexgrozav alexgrozav merged commit 38874ec into main Mar 8, 2026
4 of 8 checks passed
@alexgrozav alexgrozav deleted the alexgrozav/add-ci-workflow branch March 8, 2026 10:15
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