Skip to content

Playwright Tests

Playwright Tests #16

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
pull_request:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
workflow_dispatch:
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 60
runs-on: warp-custom-snapshot-high-iops;snapshot.key=warp-snap-praj-supabase
steps:
# - uses: actions/checkout@v4
# with:
# clean: false
- name: Authenticate with GitHub Token
run: |
git config --global credential.helper store
echo "https://${{ secrets.GITHUB_TOKEN }}@github.com" > ~/.git-credentials
- name: Pull latest changes
run: |
git pull origin ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js
uses: Warpbuilds/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: supabase/setup-cli@v1
- name: Install dependencies
run: npm i --no-audit
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test:playwright
# mark the action as succeeded even if the tests failed. This is temporarily until we make the tests more stable.
# continue-on-error: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-tests/playwright-report/
retention-days: 7
- name: Create snapshot
uses: WarpBuilds/snapshot-save@v1
with:
alias: 'warp-snap-praj-supabase'
fail-on-error: true
wait-timeout-minutes: 45