|
1 | | -name: Tests (against typescript@5.0.4 in Node.js v20) |
| 1 | +name: Tests (against typescript@next in Node.js v24) |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | test: |
14 | | - strategy: |
15 | | - matrix: |
16 | | - os: |
17 | | - - macos-latest |
18 | | - - ubuntu-latest |
19 | | - - windows-latest |
20 | | - node: |
21 | | - - 20 |
22 | | - - 22 |
23 | | - |
24 | | - runs-on: ${{ matrix.os }} |
25 | | - name: ${{ matrix.os }} (Node v${{ matrix.node }}) |
26 | | - |
| 14 | + runs-on: ubuntu-latest |
| 15 | + name: Ubuntu/Node v24 |
27 | 16 | steps: |
28 | 17 | - uses: actions/checkout@v6 |
29 | 18 | - uses: actions/setup-node@v6 |
30 | 19 | with: |
31 | | - node-version: ${{ matrix.node }} |
| 20 | + node-version: 24 |
32 | 21 | - uses: pnpm/action-setup@v5 |
33 | 22 | - name: Install dependencies |
34 | 23 | run: pnpm install |
| 24 | + - name: Install latest peer dependencies |
| 25 | + run: pnpm add typescript@next @types/node@24 |
| 26 | + working-directory: packages/knip |
35 | 27 | - name: Build knip |
36 | 28 | run: pnpm run build |
37 | 29 | working-directory: packages/knip |
38 | | - - name: Install earliest supported peer dependencies |
39 | | - run: pnpm add typescript@5.0.4 @types/node@20 |
40 | | - working-directory: packages/knip |
41 | | - - name: Type-check against TS 5.0.4 |
42 | | - run: | |
43 | | - node -e "let f=require('fs'),p='tsconfig.json';f.writeFileSync(p,f.readFileSync(p,'utf8').replace(/.*(?:rewriteRelativeImportExtensions|erasableSyntaxOnly).*\n/g,''))" |
44 | | - pnpm tsc --noEmit |
45 | | - working-directory: packages/knip |
46 | 30 | - name: Test knip |
47 | | - run: pnpm run test:smoke |
| 31 | + run: pnpm run test:node |
48 | 32 | working-directory: packages/knip |
49 | 33 | - name: Run knip |
50 | | - run: ./packages/knip/bin/knip.js --reporter github-actions |
| 34 | + run: ./packages/knip/bin/knip.js |
51 | 35 | - name: Run knip in strict mode |
52 | 36 | run: ./packages/knip/bin/knip.js --production --strict |
0 commit comments