chore: clean up test workflow #129
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - "[0-9]+.[0-9]+.x" | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [14, 16, 18, 20, 22] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install compatible NPM version | |
| if: matrix.node-version == 14 | |
| run: npm install -g npm@^9 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test:cov | |
| - name: Collect coverage | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| flag-name: run-${{ join(matrix.*, '-') }} | |
| parallel: true | |
| coverage: | |
| name: Finish coverage | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Finish coverage | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true |