Skip to content

Docs: Try to add visual-test results to CI #8

Docs: Try to add visual-test results to CI

Docs: Try to add visual-test results to CI #8

Workflow file for this run

name: Visual Test (Playwright)
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
playwright-run:
name: Test (${{ matrix.shard }})
timeout-minutes: 60
runs-on: macos-latest-xlarge
strategy:
fail-fast: false
matrix:
shard: ['1/5', '2/5', '3/5', '4/5', '5/5']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Build
run: yarn build
- name: Run your tests
id: run-tests
run: |
delimiter=$(openssl rand -hex 8)
{
echo "PLAYWRIGHT_RUN<<$delimiter"
yarn run playwright:visual-test --workers 2 --shard=${{ matrix.shard }}
echo "$delimiter"
} >> "$GITHUB_OUTPUT"
shell: bash
- name: Comment PR with execution number
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ steps.run-tests.outputs.PLAYWRIGHT_RUN }}
comment_tag: visual-test