Skip to content

Commit d0d4faf

Browse files
hitode909claude
andcommitted
Fix CI to work across all branches
- Update GitHub Actions from v2/v3 to v4 (modern versions) - Update Node.js from 12.x to 18.x/20.x/22.x matrix testing - Add 2025 branch to CI triggers - Fix cross-platform test issues (replace 'cal' with 'echo') - Add --legacy-peer-deps for dependency resolution - Add security audit job This ensures all branches will have working CI and tests pass on Ubuntu environment used by GitHub Actions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 339182d commit d0d4faf

File tree

2 files changed

+46
-16
lines changed

2 files changed

+46
-16
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,58 @@
11
---
22

33
name: CI
4+
45
on:
56
pull_request:
67
push:
78
branches:
89
- master
10+
- 2025
11+
912
jobs:
1013
test:
14+
name: Test on Node.js ${{ matrix.node-version }}
1115
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x, 20.x, 22.x]
20+
1221
steps:
13-
- uses: actions/checkout@v3
14-
- name: Use Node.js
15-
uses: actions/setup-node@v2
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
1627
with:
17-
node-version: '12.x'
18-
- uses: actions/cache@v2
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci --legacy-peer-deps
33+
34+
- name: Run tests
35+
run: npm test
36+
37+
- name: Run build
38+
run: npm run compile
39+
40+
security:
41+
name: Security audit
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v4
47+
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
1950
with:
20-
path: ~/.npm
21-
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
22-
restore-keys: |
23-
${{ runner.os }}-npm-
24-
- name: install
25-
run: npm ci
26-
- run: npm test
27-
env:
28-
CI: true
51+
node-version: '20.x'
52+
cache: 'npm'
53+
54+
- name: Install dependencies
55+
run: npm ci --legacy-peer-deps
56+
57+
- name: Run security audit
58+
run: npm audit --audit-level=high

src/test/Runner.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ describe('Runner', () => {
4949
const runner = new Runner({
5050
retry: 3,
5151
config: 'backstop.json',
52-
command: 'cal -y',
53-
referenceCommand: 'cal',
52+
command: 'echo "test"',
53+
referenceCommand: 'echo "ref"',
5454
rootDir: resolve('backstop/failed'),
5555
});
5656
expect(await runner.run()).toEqual(true);

0 commit comments

Comments
 (0)