Docs: Try to add visual-test results to CI #35
Workflow file for this run
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: Visual Test (Playwright) | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: write | |
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: | |
- name: Comment PR with execution number | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
Visual test output will be shown!! | |
message-id: visual-test | |
proxy-url: https://ravi-gh-comment-proxy.deno.dev | |
- 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: results | |
uses: mathiasvr/command-output@v2.0.0 | |
with: | |
run: npx playwright test playwright/visual-test --config=playwright/playwright.config.js --workers=2 --quiet --reporter='playwright/reporters/reporter.js' --shard=${{ matrix.shard }} || true | |
- name: Comment PR with execution number | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
${{ steps.results.outputs.stdout }} | |
message-id: visual-test | |
proxy-url: https://ravi-gh-comment-proxy.deno.dev |