| 1 |
name: Node CI |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
build: |
| 7 |
|
| 8 |
runs-on: ${{ matrix.os }} |
| 9 |
|
| 10 |
strategy: |
| 11 |
matrix: |
| 12 |
node-version: [12.x, 14.x, 15.x] |
| 13 |
os: [ubuntu-latest, windows-latest, macos-latest] |
| 14 |
|
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v1 |
| 17 |
- name: Use Node.js ${{ matrix.node-version }} |
| 18 |
uses: actions/setup-node@v1 |
| 19 |
with: |
| 20 |
node-version: ${{ matrix.node-version }} |
| 21 |
- name: npm install, build, and test |
| 22 |
run: | |
| 23 |
npm install |
| 24 |
npm run build --if-present |
| 25 |
npm test |
| 26 |
- name: Codecov |
| 27 |
uses: codecov/codecov-action@v1 |