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