Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ jobs:
test-e2e-rollup:
name: E2E Tests
if: always()
needs: [test-e2e]
needs: [test-e2e, test-e2e-cloudflare, test-e2e-playground]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check E2E shard results
- name: Check E2E results
run: |
if [ "${{ needs.test-e2e.result }}" != "success" ]; then
if [ "${{ needs.test-e2e.result }}" != "success" ] ||
[ "${{ needs.test-e2e-cloudflare.result }}" != "success" ] ||
[ "${{ needs.test-e2e-playground.result }}" != "success" ]; then
echo "E2E tests failed or were cancelled"
exit 1
fi
Expand Down Expand Up @@ -278,6 +280,36 @@ jobs:
test-results/
retention-days: 7

test-e2e-playground:
name: Playground E2E
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter "@emdash-cms/playground^..." build
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm exec playwright install --with-deps chromium
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: pnpm run test:e2e:playground
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: playwright-report-playground
path: test-results/
Comment thread
ascorbic marked this conversation as resolved.
retention-days: 7

test-e2e-cloudflare:
name: E2E Cloudflare (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -311,8 +343,6 @@ jobs:
- run: pnpm exec playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
EMDASH_E2E_TARGET: cloudflare
- run: pnpm run test:e2e:playground
if: matrix.shardIndex == 1
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
Expand Down
2 changes: 1 addition & 1 deletion e2e/playground/media-ready.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function openFreshPlayground(page: Page): Promise<void> {
dialog.getByRole("button", { name: "Get Started" }).click(),
);
await page.goto("/playground");
await page.waitForURL(ADMIN_URL_PATTERN, { timeout: 120_000 });
await page.waitForURL(ADMIN_URL_PATTERN, { timeout: 240_000 });
await expect(page.getByRole("link", { name: "Media", exact: true })).toBeVisible({
timeout: 60_000,
});
Expand Down
9 changes: 7 additions & 2 deletions e2e/playground/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { fileURLToPath } from "node:url";

import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: ".",
testMatch: "media-ready.spec.ts",
outputDir: fileURLToPath(new URL("../../test-results", import.meta.url)),
fullyParallel: false,
workers: 1,
timeout: 120_000,
retries: process.env.CI ? 1 : 0,
timeout: 360_000,
expect: { timeout: 60_000 },
use: {
baseURL: "http://localhost:4450",
trace: "on-first-retry",
trace: "retain-on-failure",
screenshot: "only-on-failure",
...devices["Desktop Chrome"],
},
Expand Down
Loading