chore: upload CI artifact on failure #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache core files | |
uses: actions/cache@v3 | |
id: cache-core | |
with: | |
path: | | |
core/* | |
!core/live2d.d.ts | |
key: ${{ runner.os }}-core-${{ hashFiles('scripts/setup.js') }} | |
- run: npm ci | |
- if: steps.cache-core.outputs.cache-hit != 'true' | |
run: npm run setup | |
- uses: GabrielBB/[email protected] | |
with: | |
run: npm run test:ci | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: diff-images | |
path: test/**/__image_snapshots__/__diff_output__/* | |
if-no-files-found: ignore |