Skip to content

Add CI quality gates: 95% coverage, lint, format, typecheck, CodeQL - #5

Merged
dimastatz merged 2 commits into
mainfrom
ci/quality-gates
Oct 5, 2026
Merged

dimastatz merged 2 commits into
mainfrom
ci/quality-gates

Conversation

@dimastatz

@dimastatz dimastatz commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

CI workflow (.github/workflows/ci.yml), on every PR and push to main:

  • Format, lint, typecheck: prettier --check, type-aware ESLint (strictTypeChecked + stylisticTypeChecked), tsc --noEmit, and npm audit --omit=dev --audit-level=high
  • Tests (coverage >= 95%): runs the VS Code integration tests under xvfb with coverage. scripts/check-coverage.mjs fails the job if lines, statements, functions, or branches are below 95%. The coverage report is uploaded as an artifact.
  • Package VSIX: runs after both jobs pass and uploads the .vsix.

CodeQL workflow (.github/workflows/codeql.yml): security-and-quality queries on PRs, pushes to main, and weekly.

Other changes

  • New npm scripts: format, format:check, typecheck, test:coverage, check (runs everything CI runs)
  • New tests for toggling dictation and deactivate. Coverage is now 100%.
  • Prettier reformatted the existing Markdown tables
  • CLAUDE.md and README updated with the new commands

Notes

  • The audit gate skips dev dependencies. @vscode/test-cli (latest) depends on a mocha version with a high-severity serialize-javascript advisory. That code runs only in tests and is not shipped in the extension.
  • No Dockerfile: GitHub's Ubuntu runners already have xvfb, and the VS Code test host downloads itself.
  • To block merges on these checks, they still need to be marked as required in branch protection for main.

Test plan

  • npm run check passes locally: 3 tests, 100% coverage
  • Coverage gate exits 1 when coverage is below the threshold
  • CI is green on this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_01TC6WCRgEsuzNtiSyAN59vi

- test:coverage runs the VS Code tests with coverage and fails below 95%
  on lines, statements, functions, or branches
- Prettier formatting check; ESLint upgraded to strictTypeChecked
- tsc --noEmit typecheck and npm audit on runtime dependencies
- GitHub Actions CI workflow (xvfb for VS Code tests) and CodeQL workflow
- Tests for toggling dictation and deactivate (100% coverage)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TC6WCRgEsuzNtiSyAN59vi
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@dimastatz
dimastatz merged commit 730057e into main Oct 5, 2026
5 checks passed
@dimastatz
dimastatz deleted the ci/quality-gates branch October 7, 2026 04:07
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