generate visual diff on err #45
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: Tests | |
on: [push, pull_request] | |
env: | |
CHROMIUM_BUILD_NUMBER: 1056772 | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
# os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Windows fix. See https://github.com/actions/checkout/issues/226 | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- name: yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache chromium | |
id: cache-chromium | |
uses: actions/cache@v3 | |
with: | |
path: chromium | |
key: ${{ runner.os }}-chromium-${{ env.CHROMIUM_BUILD_NUMBER }} | |
- uses: FedericoCarboni/setup-ffmpeg@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: yarn | |
- run: npx @puppeteer/browsers install chromium@${{ env.CHROMIUM_BUILD_NUMBER }} chromium | |
- run: yarn workspace reactive-video build | |
- run: npm test | |
- run: npm run lint | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: artifact | |
path: | | |
reactive-video-assets/test-output/ | |
reactive-video-assets/test-image-snapshots/__diff_output__/ |