-
Notifications
You must be signed in to change notification settings - Fork 432
43 lines (41 loc) · 1.02 KB
/
jest.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
name: Jest Tests
on:
pull_request:
branches:
- main
- dev
paths:
- 'platform/**'
push:
branches:
- main
paths:
- 'platform/**'
jobs:
jest_unittests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [18, 19, 20, 21]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: |
~/.pnpm-store
platform/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install pnpm
run: npm install -g pnpm
- run: pnpm i -D --ignore-scripts && pnpm add jest-environment-jsdom
working-directory: platform
- run: pnpm run test:unit
working-directory: platform