2020-11-22 02:28:14 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version:
|
2021-04-24 01:52:03 +00:00
|
|
|
- 16.x # Changing this? Remind to keep linter conditions below and in publish.yml aligned.
|
2020-11-22 02:28:14 +00:00
|
|
|
- 10.x
|
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-02-27 03:19:45 +00:00
|
|
|
# Will also (through `prepare` hook): 1. install ./app, and 2. build
|
|
|
|
- run: npm install --no-fund
|
|
|
|
# Only run linter once, for faster CI. Align the versions of Node here with above and publish.yml.
|
2021-04-24 01:52:03 +00:00
|
|
|
- if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '16.x'
|
2020-11-22 02:28:14 +00:00
|
|
|
run: npm run lint
|
|
|
|
- run: npm test
|