feat: set up pre-release workflow #126
Workflow file for this run
This file contains 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: | |
types: [opened, synchronize] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node_version: [14, 16, 18, 20, 22] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Install compatible NPM version | |
if: matrix.node_version == 14 | |
run: npm install -g npm@^9 | |
- name: Install | |
run: npm ci | |
- name: Test | |
run: npm run test:cov | |
- uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel: true | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |