mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
* add new e2e folder * add local supabase and confitional storage * fix e2e selfhosted * update actions * add correct e2e folder * fix e2e actions * fix action project ids * fix permissions * fix script * fix playwright install * playwright root * pnpm i * fix api rul * add env docs * update run script * only install deps for e2e * use same dep * only install deps for tests * upd lockfile * use official vercel integration * use vercel cli * remove old folder * fix script * rm filter * rename e2e studio package * fix install browsers * add polling for vercel build * use vercel-preview-url package * undo actions * rename ci env to ci * chore:add rls check and make playwright test less flakey (#35348) * update ci action * fix paths * fix browser install * run ci against staging * try caching builds * fix envs * fix env check * fix sign in * fix sign in url * fix envs and url * fix caching * fix race condition in sign in page * fix race condition in sign in page * add check to see if being redirected * fix caching, check IS_PLATFORM var * log is_platform * try vercel build * fix vercel project id * fix path * add temp vercel.json file * fix paths * undo project id stuff * rm cwd * fix path * fix paths again * fix path * fix base url * try different fix * fix config base url * fix base studio url issues * retain video on fails * Update e2e/studio/README.md Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com> * Update e2e/studio/README.md Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com> * fix env file naming * undo caching * rm old tests folder * fix readme scripts * rm vercel deploy for now, just run build locally * fix url * fix build script * fix is_platform * fix stuck studio start * fix env vars * retain network and logs on fail for better debugging * add apiurl env * back to vercel * disable catpcha * fix test * update environment configuration to remove default URLs for CI and streamline API base URL handling * fix typeerr * fix urls in home.spec * fix urls in logs.spec * fix urls in sqleditor spec * fix table editor spec * add tourl util * use staging api in ci * re add base url env var * fix url in projects page * fix url in sql editor spec * fix sign in not waiting for cookies omfg * fix env var name * fix sql-editor test * simplify table removal * add opt out telemetry step * fix logs tests * fix table editor spec * remove flaky steps from table editor tests * use vercel deployment events instead of build * add studio check * fix condition * debug event * rm if * trigger deploy * undo ac * make opt out button step optional, some envs dont hav eit * use testid for sql run button * use id instaed of timestamp in logs tests * empty * rm retries * up glbal timeout * chore: fix failing sql-editor playwright test (#35767) * chore: fix failing sql-editor playwright test * chore: minor fixes * Chore/update playwright config (#35826) chore: update playwright config * rm supabase project from e2e tests * refactor and simplify environments * fix sql editor test * fix ci env vars * fix * fix on windows * update readme * add playwright install script to readme * rm turbopack trace flag * npm to pnpm for scripts * delete ivan lines --------- Co-authored-by: Michael Ong <minghao_3728@hotmail.com> Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Studio E2E Tests
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/pg-meta/**/*'
|
|
- 'apps/studio/**'
|
|
- 'e2e/studio/**'
|
|
- 'pnpm-lock.yaml'
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/pg-meta/**/*'
|
|
- 'apps/studio/**'
|
|
- 'e2e/studio/**'
|
|
- 'pnpm-lock.yaml'
|
|
|
|
# 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
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
# Make the job non-blocking
|
|
continue-on-error: true
|
|
|
|
env:
|
|
EMAIL: ${{ secrets.CI_EMAIL }}
|
|
PASSWORD: ${{ secrets.CI_PASSWORD }}
|
|
PROJECT_REF: ${{ secrets.CI_PROJECT_REF }}
|
|
NEXT_PUBLIC_IS_PLATFORM: true
|
|
NEXT_PUBLIC_API_URL: https://api.supabase.green
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STUDIO_HOSTED_PROJECT_ID }}
|
|
NEXT_PUBLIC_HCAPTCHA_SITE_KEY: 10000000-ffff-ffff-ffff-000000000001
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i
|
|
|
|
- name: Install Vercel CLI
|
|
run: pnpm add --global vercel@latest
|
|
|
|
- name: Pull Vercel Environment Information (Preview)
|
|
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
|
|
|
|
- name: Build Project Artifacts for Vercel
|
|
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
|
|
|
|
- name: Deploy Project to Vercel and Get URL
|
|
id: deploy_vercel
|
|
run: |
|
|
DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
|
|
echo "Vercel Preview URL: $DEPLOY_URL"
|
|
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm -C e2e/studio exec playwright install --with-deps
|
|
|
|
- name: Run Playwright tests
|
|
id: playwright
|
|
env:
|
|
AUTHENTICATION: true
|
|
STUDIO_URL: ${{ steps.deploy_vercel.outputs.DEPLOY_URL }}/dashboard
|
|
run: pnpm e2e
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-artifacts
|
|
path: |
|
|
e2e/studio/playwright-report/
|
|
e2e/studio/test-results/
|
|
retention-days: 7
|