|
5 | 5 | - master |
6 | 6 | - "[0-9]+.[0-9]+.x" |
7 | 7 | pull_request: |
8 | | - types: [opened, synchronize] |
| 8 | + types: [opened, synchronize, reopened] |
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | test: |
| 12 | + name: Run tests on Node.js ${{ matrix.node-version }} |
12 | 13 | runs-on: ubuntu-latest |
13 | 14 | strategy: |
14 | 15 | fail-fast: false |
15 | 16 | matrix: |
16 | | - node_version: [14, 16, 18, 20, 22] |
| 17 | + node-version: [14, 16, 18, 20, 22] |
17 | 18 |
|
18 | 19 | steps: |
19 | | - - uses: actions/checkout@v2 |
20 | | - - name: Use Node.js ${{ matrix.node_version }} |
21 | | - uses: actions/setup-node@v1 |
| 20 | + - name: Checkout repository |
| 21 | + uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Setup Node.js |
| 24 | + uses: actions/setup-node@v4 |
22 | 25 | with: |
23 | | - node-version: ${{ matrix.node_version }} |
| 26 | + node-version: ${{ matrix.node-version }} |
24 | 27 |
|
25 | 28 | - name: Install compatible NPM version |
26 | | - if: matrix.node_version == 14 |
| 29 | + if: matrix.node-version == 14 |
27 | 30 | run: npm install -g npm@^9 |
28 | 31 |
|
29 | | - - name: Install |
| 32 | + - name: Install dependencies |
30 | 33 | run: npm ci |
31 | | - - name: Test |
| 34 | + |
| 35 | + - name: Run tests |
32 | 36 | run: npm run test:cov |
33 | | - - uses: coverallsapp/[email protected] |
| 37 | + |
| 38 | + - name: Collect coverage |
| 39 | + uses: coverallsapp/github-action@v2 |
34 | 40 | with: |
35 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + flag-name: run-${{ join(matrix.*, '-') }} |
36 | 42 | parallel: true |
37 | 43 |
|
38 | 44 | coverage: |
| 45 | + name: Publish coverage |
39 | 46 | needs: test |
40 | 47 | runs-on: ubuntu-latest |
41 | 48 | steps: |
42 | | - - uses: coverallsapp/[email protected] |
| 49 | + - name: Publish coverage |
| 50 | + uses: coverallsapp/github-action@v2 |
43 | 51 | with: |
44 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
45 | 52 | parallel-finished: true |
0 commit comments