| 1 |
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 |
|
| 4 |
name: build |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: [master] |
| 9 |
pull_request: |
| 10 |
branches: [master] |
| 11 |
|
| 12 |
env: |
| 13 |
FORCE_COLOR: 2 |
| 14 |
|
| 15 |
jobs: |
| 16 |
build: |
| 17 |
runs-on: ubuntu-latest |
| 18 |
|
| 19 |
strategy: |
| 20 |
matrix: |
| 21 |
node-version: [10.x, 12.x, 14.x, 15.x] |
| 22 |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
| 23 |
# For now is not possible to target LTS verssions =/ check progress here https://github.com/actions/setup-node/issues/26 |
| 24 |
|
| 25 |
steps: |
| 26 |
- uses: actions/checkout@v2 |
| 27 |
- name: Use Node.js ${{ matrix.node-version }} |
| 28 |
uses: actions/setup-node@v2 |
| 29 |
with: |
| 30 |
node-version: ${{ matrix.node-version }} |
| 31 |
- run: npm ci |
| 32 |
- run: npm run build --if-present |
| 33 |
- run: npm run lint |
| 34 |
- run: npm test |