-
-
Notifications
You must be signed in to change notification settings - Fork 108
48 lines (37 loc) · 1.05 KB
/
main.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Node CI
on:
push:
paths:
- '.github/workflows/*'
- 'src/**'
- 'markdown.css'
- 'package*.json'
jobs:
build:
strategy:
fail-fast: false
matrix:
node: [16, 18]
os: ['ubuntu-latest', 'windows-latest', 'macOS-latest']
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3.3.0
- name: Use Node.js ${{ matrix.node }}.x
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node }}.x
- name: install
run: npm install
- name: lint
run: npx xo
if: matrix.os == 'ubuntu-latest'
- name: build
run: npm run build
- name: test lib
run: npx nyc ava src/test/lib.spec.ts --timeout=1m
- name: test api
run: npx ava src/test/api.spec.ts --timeout=1m
- name: test cli
run: npx ava src/test/cli.spec.ts --timeout=2m
if: matrix.os != 'windows-latest' # because they just time out ¯\_(ツ)_/¯