2019-10-02 12:18:38 +00:00
|
|
|
name: toolkit-unit-tests
|
2020-01-14 16:19:06 +00:00
|
|
|
on:
|
2019-10-03 16:45:11 +00:00
|
|
|
push:
|
2019-12-26 22:00:18 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2019-10-03 17:07:22 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2020-01-14 16:19:06 +00:00
|
|
|
- '**.md'
|
2019-11-18 21:20:01 +00:00
|
|
|
|
2019-07-11 20:12:50 +00:00
|
|
|
jobs:
|
2019-11-18 21:20:01 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
runs-on: [ubuntu-latest, macOS-latest, windows-latest]
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
|
2019-07-26 03:00:31 +00:00
|
|
|
steps:
|
2019-07-26 03:08:57 +00:00
|
|
|
- name: Checkout
|
2020-01-14 15:48:34 +00:00
|
|
|
uses: actions/checkout@v2
|
2019-07-26 03:08:57 +00:00
|
|
|
|
2019-11-18 21:20:01 +00:00
|
|
|
- name: Set Node.js 12.x
|
2020-01-14 16:19:06 +00:00
|
|
|
uses: actions/setup-node@v1
|
2019-07-11 20:12:50 +00:00
|
|
|
with:
|
2019-11-18 21:20:01 +00:00
|
|
|
node-version: 12.x
|
2019-07-11 20:12:50 +00:00
|
|
|
|
|
|
|
- name: npm install
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Bootstrap
|
|
|
|
run: npm run bootstrap
|
|
|
|
|
|
|
|
- name: Compile
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: npm test
|
|
|
|
run: npm test
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: npm run lint
|
|
|
|
|
|
|
|
- name: Format
|
|
|
|
run: npm run format-check
|
2020-01-03 22:54:10 +00:00
|
|
|
|
|
|
|
- name: audit tools
|
|
|
|
run: npm audit --audit-level=moderate
|
2020-01-04 19:08:05 +00:00
|
|
|
if: matrix.runs-on == 'ubuntu-latest'
|
2020-01-03 22:54:10 +00:00
|
|
|
|
|
|
|
- name: audit packages
|
|
|
|
run: npm run audit-all
|
2020-01-04 19:08:05 +00:00
|
|
|
if: matrix.runs-on == 'ubuntu-latest'
|