chore: upload mismatch snapshots #41
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: unit | |
on: [push] | |
jobs: | |
unit-ssr-for-visual-regression: | |
name: Unit & SSR for Visual Regression | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Python 3.11 和 node-gyp 有兼容问题, 导致无法安装依赖 | |
# https://github.com/slint-ui/slint/commit/a9c48e33502fdebc36c5aa2f4f516c2218424679#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install headless-gl dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Cov | |
run: | | |
xvfb-run -s "-ac -screen 0 1280x1024x16" pnpm cov | |
env: | |
CI: true | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload blob report to GitHub Actions Artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snapshots | |
path: | | |
__tests__/ssr/snapshots/**/*-actual.svg | |
__tests__/ssr/snapshots/**/*-actual.png | |
retention-days: 1 |