ci: Add GitHub Actions workflows for automated testing and validation#80
Open
chris-schra wants to merge 7 commits intodevelopfrom
Open
ci: Add GitHub Actions workflows for automated testing and validation#80chris-schra wants to merge 7 commits intodevelopfrom
chris-schra wants to merge 7 commits intodevelopfrom
Conversation
Add --github-actions flag to output validation results in GitHub Actions workflow command format. Implements complete annotation support with: - Severity mapping: error → ::error, warning → ::warning, info → ::notice - File paths relative to process.cwd() for GitHub Actions - Tool status reporting for failed/skipped tools as ::warning - Title format: tool(ruleId) for easy identification - Exit code 1 for validation failures or tool failures Implementation: - Extracted formatter to util/github-actions-formatter.ts for maintainability - Integrated into CLI flow with proper exit code handling - Uses console.info for output (linter-approved) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added two parallel CI workflows: 1. **test.yml** - Runs test suite with coverage reporting - Uses vitest github-actions reporter for inline annotations - Generates coverage report on PRs using vitest-coverage-report-action - Runs on both push and pull_request events 2. **validate.yml** - Runs TypeScript/ESLint/Prettier validation - Uses new --github-actions flag for PR annotations - Shows validation errors inline in PR file view - Runs on both push and pull_request events Both workflows: - Run in parallel as separate checks in PR view - Use Node.js 20 with yarn caching - Set proper permissions for PR comments/checks - Fail the build if issues are found **Enhanced ts-validate command:** - Added --github-actions flag for CI integration - Outputs errors in GitHub Actions annotation format - Supports ::error, ::warning, and ::notice severity levels - Reports tool failures/skips as warnings - Proper exit codes (1 for failures, 0 for success) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
fd95f2c to
0832660
Compare
- Add Playwright chromium installation for browser tests - Fix file:// URL handling in session-manager.test.ts for CI - Use 'npx tsx' instead of 'tsx' for CI compatibility Tests now work in both local and CI environments.
241660d to
885bfb7
Compare
- Cache Playwright browsers using actions/cache - Key cache by Playwright version for consistency - Only download browsers on cache miss - Install system dependencies separately when using cache - Significantly reduces CI time by avoiding repeated chromium downloads Typical savings: 30-60 seconds per CI run 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
a11b12d to
4749592
Compare
The test was failing because it tried to evaluate immediately after session creation, before the WebSocket connection was fully established. Fixed by: - Add waitForPause(5000) after session creation to ensure connection ready - Add try-finally for proper cleanup - Keep reasonable timeouts (no need for excessive waits) This ensures the WebSocket is connected before we try to use it, preventing the 'WebSocket connection closed' race condition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
512cb71 to
5599bc1
Compare
5599bc1 to
3e07a51
Compare
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
Adds comprehensive CI/CD workflows for automated testing and validation on pull requests and pushes.
New Workflows
1. Test Workflow (
.github/workflows/test.yml)vitest-coverage-report-actionyarn testwith GitHub Actions reporter integration2. Validate Workflow (
.github/workflows/validate.yml)--github-actionsflag for PR annotationsyarn validate --github-actionsEnhanced ts-validate Command
New
--github-actionsflag:::error- TypeScript errors, ESLint errors::warning- ESLint warnings::notice- Info-level messages (like auto-formatting)Example annotation output:
Workflow Benefits
Parallel Execution:
PR Integration:
Developer Experience:
Configuration Details
Both workflows:
pull_requestandpushevents for main/developTesting
Workflows have been validated:
--github-actionsflagBreaking Changes
None - This only adds CI workflows and a new optional flag to ts-validate.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com