-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (46 loc) · 1.42 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: CI
on: [push, pull_request]
jobs:
test:
name: Testing on ${{matrix.os}} and Node ${{matrix.node_version}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node_version: [16]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node ${{matrix.node_version}}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node_version }}
- name: Cache pnpm modules
uses: actions/cache@v3
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-
- name: install pnpm
run: npm i pnpm@^8.3.1 -g
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node_version}}-jest-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{matrix.node_version}}-jest-
- name: Install Dependencies
run: pnpm i
- name: Check Format
run: pnpm pretty:check
- name: Test
run: pnpm test -- --logHeapUsage
- name: Test Integration
run: pnpm test:integration
- name: Test ESM
run: node scripts/test-esm.mjs