mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
* added ui studio command * added SKIP ASSET UPLOAD option * updated failing tests * updated e2e scripts to include CI instructions * removed unused envs and slack messages * updated timeouts and max retries on CI * updated generated local env * updated env * updated env generation for e2e tests * remove vercel preview * updated tests and trying junit report on PR * update test comment * updated commit hash for reporter * updated file path * updated runner to blacksmith * update test file for reporting * Update .github/workflows/studio-e2e-test.yml Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update package.json Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update e2e/studio/playwright.config.ts Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * updated to skip comment on forks --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
77 lines
2.5 KiB
YAML
77 lines
2.5 KiB
YAML
name: Selfhosted Studio E2E Tests
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/pg-meta/**/*'
|
|
- 'apps/studio/**'
|
|
- 'e2e/studio/**'
|
|
- 'pnpm-lock.yaml'
|
|
pull_request:
|
|
paths:
|
|
- 'packages/pg-meta/**/*'
|
|
- 'apps/studio/**'
|
|
- 'e2e/studio/**'
|
|
- 'pnpm-lock.yaml'
|
|
- '.github/workflows/studio-e2e-test.yml'
|
|
|
|
# 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
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 60
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
# Require approval only for pull requests from forks
|
|
environment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork && 'Studio E2E Tests' || '' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm -C e2e/studio exec playwright install chromium --with-deps --only-shell
|
|
|
|
- name: 🚀 Run Playwright tests against Vercel Preview
|
|
id: playwright
|
|
run: pnpm e2e
|
|
|
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
if: always()
|
|
with:
|
|
name: playwright-artifacts
|
|
path: |
|
|
e2e/studio/playwright-report/
|
|
e2e/studio/test-results/
|
|
retention-days: 7
|
|
|
|
- name: Comment Playwright test results on PR
|
|
uses: daun/playwright-report-comment@be9e270edd5ad86038604d3caa84a819a6ff6fed # v3.10.0
|
|
if: always() && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork
|
|
with:
|
|
report-file: e2e/studio/test-results/test-results.json
|
|
comment-title: '🎭 Playwright Test Results'
|
|
|
|
- name: Fail job if tests failed
|
|
if: steps.playwright.outcome != 'success' || steps.summarize.outputs.flaky_count > 0
|
|
run: |
|
|
echo "E2E tests failed" >&2
|
|
exit 1
|