-
Notifications
You must be signed in to change notification settings - Fork 13
ci(actions): add dedicated pull request workflow #66
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: PR CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: pr-ci-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| validate: | ||
| name: PR Validation | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20.x | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Security audit (CI policy) | ||
| run: npm run audit:ci | ||
|
|
||
| - name: Lockfile floor guard | ||
| run: npm run test -- test/lockfile-version-floor.test.ts | ||
|
Comment on lines
+35
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial lockfile floor guard test runs twice in this workflow.
- name: Run tests
- run: npm test
+ run: npm run test -- --exclude test/lockfile-version-floor.test.tsalternatively, accept the duplication since it's fast and keeps the explicit guard visible. 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Repository hygiene check | ||
| run: npm run clean:repo:check | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Run type check | ||
| run: npm run typecheck | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint | ||
|
|
||
| - name: Run tests | ||
| run: npm test | ||
|
greptile-apps[bot] marked this conversation as resolved.
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Build | ||
| run: npm run build | ||
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.
pr validation only runs on node 20.x, but ci.yml tests both 20.x and 22.x.
this means a regression specific to node 22.x could slip through PR validation and only fail after merge to main. consider adding a matrix here too, or at minimum document this gap is intentional.
suggested matrix addition
jobs: validate: name: PR Validation runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x, 22.x] steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ${{ matrix.node-version }} cache: npm🤖 Prompt for AI Agents