-
Notifications
You must be signed in to change notification settings - Fork 0
Add CI workflow for linting and type checking , also run a smoke test for summary actions #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… for summary actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a GitHub Actions CI workflow to automate code quality checks through linting and TypeScript type checking on pushes and pull requests to the main branch. The workflow includes optimizations for ignoring documentation changes and implements concurrency control to prevent redundant runs.
- Added a new CI workflow with automated linting and type checking
- Configured pnpm and Node.js 20 for dependency management
- Implemented concurrency control and path filtering for documentation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: pnpm lint | ||
|
|
||
| - name: Type check | ||
| run: pnpm tsc --noEmit |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The package.json only has a lint script but does not have a tsc script. The command pnpm tsc --noEmit will work if TypeScript is installed, but it would be more maintainable to add a typecheck or type-check script to package.json (e.g., "typecheck": "tsc --noEmit") and call it here as pnpm typecheck. This ensures consistency and makes it easier to modify type-checking behavior in one place.
| run: pnpm tsc --noEmit | |
| run: pnpm typecheck |
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull-requests: write permission is granted but never used in this workflow. The workflow only performs linting and type checking without any PR-related write operations (like posting comments). Consider removing this unnecessary permission to follow the principle of least privilege.
| pull-requests: write |
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 |
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetch-depth: 0 fetches the entire Git history, which is unnecessary for linting and type checking. This increases CI runtime and resource usage. Consider using the default shallow clone (fetch-depth: 1) or removing this parameter entirely unless there's a specific need for full history (e.g., for changelog generation or commit analysis).
| fetch-depth: 0 | |
| fetch-depth: 1 |
| - name: Verify pnpm | ||
| run: pnpm -v | ||
|
|
Copilot
AI
Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The "Verify pnpm" step that runs pnpm -v appears to be a debugging/verification step that doesn't add value to the CI workflow. If pnpm setup fails, subsequent steps would fail anyway. Consider removing this step to simplify the workflow.
| - name: Verify pnpm | |
| run: pnpm -v |
This pull request introduces a new GitHub Actions workflow for continuous integration (CI), ensuring code quality through automated linting and TypeScript type checking on pushes and pull requests to the
mainbranch. The workflow is optimized to ignore documentation changes and supports concurrency control to avoid redundant runs.CI workflow setup and quality checks:
.github/workflows/CI.ymlfile that defines a CI workflow triggered on pushes and pull requests tomain, excluding documentation changes.pnpmand Node.js, install dependencies, and run both linting and TypeScript type checks to enforce code quality.