Handle unhandled promise rejections #1726
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: Playwright Tests | |
on: | |
schedule: | |
- cron: "0 6 * * *" | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
playwright: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: "pnpm" | |
cache-dependency-path: | | |
pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build @gitbutler/ui | |
run: cd packages/ui && pnpm package | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./app/package.json').devDependencies['@playwright/test'].substring(1))")" >> $GITHUB_ENV | |
- name: Cache playwright binaries | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install Playwright Browsers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: pnpm dlx "playwright@$PLAYWRIGHT_VERSION" install --with-deps chromium | |
- name: Run Tests | |
run: cd app && pnpm test:e2e | |
env: | |
CI: true | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: app/test-results/**/trace.zip | |
if-no-files-found: ignore | |
retention-days: 30 |