-
-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (37 loc) Β· 1021 Bytes
/
test.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
name: Test
on:
push:
branches: [develop]
pull_request:
branches: [master, develop, next]
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7
run_install: true
- name: Build
run: pnpm build
- name: Test
run: |
# Node.js v16 detects GITHUB_ACTIONS as a color supported environment
# https://github.com/nodejs/node/blob/v16.18.0/lib/internal/tty.js#L167
pnpm test
# Node.js 12 doesn't handle GITHUB_ACTIONS so colors must be forced
# https://github.com/nodejs/node/blob/v15.14.0/lib/internal/tty.js#L164
FORCE_COLOR=2 pnpm --use-node-version=12.22.12 test
- name: Lint
run: pnpm lint
- name: Test DTS
run: pnpm test:dts