-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (24 loc) · 776 Bytes
/
main.yml
File metadata and controls
32 lines (24 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Main Workflow
on: [push, pull_request]
jobs:
build:
# Runner VMs, ubuntu, macos, windows
# Docs: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#github-hosted-runners
runs-on: ubuntu-latest
# This strategy allow multiple Node.js versions to run on
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build
run: npm run build --if-present
- name: Test
run: npm test --if-present