feat: async run (#858) #2955
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: CI | |
on: [push] | |
jobs: | |
Test: | |
if: "!contains(github.event.head_commit.message, 'SKIP CI')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update npm | |
run: npm i -g npm@7 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
visual: | |
name: 'Visual Tests' | |
if: "!contains(github.event.head_commit.message, 'SKIP CI')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run visual tests (node ${{ matrix.node-version }}) | |
run: make ci | |
- name: Upload snapshot diffs | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: snapshots-diffs | |
path: __tests__/browser/__image_snapshots__/__diff_output__ | |
- name: Update regression test snapshots | |
if: ${{ failure() }} | |
run: make updateSnapshot | |
- name: Upload snapshots | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: image-snapshots | |
path: __tests__/browser/__image_snapshots__/ |