-
-
Notifications
You must be signed in to change notification settings - Fork 140
57 lines (48 loc) · 1.17 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test CI
on:
push:
branches: [ master ]
paths-ignore:
- "docs/**"
- "playground/**"
- "*.md"
pull_request:
branches: [ master ]
workflow_dispatch:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Cache core files
uses: actions/cache@v3
id: cache-core
with:
path: |
core/*
!core/live2d.d.ts
key: ${{ hashFiles('scripts/setup.js') }}
- run: npm ci
- if: steps.cache-core.outputs.cache-hit != 'true'
run: |
echo Cache miss: ${{ hashFiles('scripts/setup.js') }}
npm run setup
- run: npm run type
- run: npm run build
- name: Run tests
uses: GabrielBB/[email protected]
with:
run: npm test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: diff-images
path: test/**/__image_snapshots__/__diff_output__/*
if-no-files-found: ignore