|
1 | 1 | name: CI |
2 | 2 |
|
3 | | -on: |
4 | | - push: |
5 | | - branches: [ main ] |
6 | | - pull_request: |
7 | | - branches: [ main ] |
| 3 | +on: [push] |
8 | 4 |
|
9 | 5 | jobs: |
10 | 6 | build: |
11 | 7 | runs-on: ubuntu-latest |
12 | 8 | strategy: |
13 | 9 | matrix: |
14 | | - node-version: [10.x, 12.x, 14.x, 15.x] |
| 10 | + node-version: [18.x, 20.x, 22.x, 24.x] |
15 | 11 |
|
16 | 12 | steps: |
17 | | - - uses: actions/checkout@v2 |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + show-progress: false |
18 | 16 | - name: Use Node.js ${{ matrix.node-version }} |
19 | | - uses: actions/setup-node@v2 |
| 17 | + uses: actions/setup-node@v4 |
20 | 18 | with: |
21 | 19 | node-version: ${{ matrix.node-version }} |
22 | | - - name: Cache node dependencies |
23 | | - id: cache-node_modules |
24 | | - uses: actions/cache@v2 |
25 | | - with: |
26 | | - path: node_modules |
27 | | - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} |
| 20 | + cache: 'npm' |
28 | 21 | - name: Install dependencies |
29 | | - if: steps.cache-node_modules.outputs.cache-hit != 'true' |
30 | 22 | run: npm ci |
31 | 23 | - run: npm run build |
32 | 24 |
|
| 25 | + lint: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + show-progress: false |
| 32 | + - name: Use Node.js 24 |
| 33 | + uses: actions/setup-node@v4 |
| 34 | + with: |
| 35 | + node-version: 24 |
| 36 | + cache: 'npm' |
| 37 | + - name: Install dependencies |
| 38 | + run: npm ci |
| 39 | + - run: npm run lint |
| 40 | + |
33 | 41 | test: |
| 42 | + needs: lint |
34 | 43 | runs-on: ubuntu-latest |
35 | 44 | strategy: |
36 | 45 | matrix: |
37 | | - node-version: [10.x, 12.x, 14.x, 15.x] |
| 46 | + node-version: [18.x, 20.x, 22.x, 24.x] |
38 | 47 |
|
39 | 48 | steps: |
40 | | - - uses: actions/checkout@v2 |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + show-progress: false |
41 | 52 | - name: Use Node.js ${{ matrix.node-version }} |
42 | | - uses: actions/setup-node@v2 |
| 53 | + uses: actions/setup-node@v4 |
43 | 54 | with: |
44 | 55 | node-version: ${{ matrix.node-version }} |
45 | | - - name: Cache node dependencies |
46 | | - id: cache-node_modules |
47 | | - uses: actions/cache@v2 |
48 | | - with: |
49 | | - path: node_modules |
50 | | - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} |
| 56 | + cache: 'npm' |
51 | 57 | - name: Install dependencies |
52 | | - if: steps.cache-node_modules.outputs.cache-hit != 'true' |
53 | 58 | run: npm ci |
54 | 59 | - run: npm test |
0 commit comments