update README.zh #40
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 ] | |
paths-ignore: | |
- "docs/**" | |
- "playground/**" | |
- "*.md" | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.ref_name}} | |
submodules: true | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
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 | |
- name: Set up core files | |
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: Commit files | |
run: | | |
git config --global user.name 'RaSan147' | |
git config --global user.email '[email protected]' | |
git add --all | |
git commit -am "Automated report" | |
git push | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: my-artifact | |
path: ${{ github.workspace }}/dist | |
- 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 | |