Skip to content

Commit 036e2b5

Browse files
authored
Merge pull request paperclipai#1326 from paperclipai/ci/pr-e2e-tests
ci: run e2e tests on PRs
2 parents f480329 + da9b31e commit 036e2b5

2 files changed

Lines changed: 70 additions & 1 deletion

File tree

.github/workflows/pr-e2e.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: PR E2E
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
concurrency:
9+
group: pr-e2e-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
e2e:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 30
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 9.15.4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: pnpm
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Build
36+
run: pnpm build
37+
38+
- name: Install Playwright
39+
run: npx playwright install --with-deps chromium
40+
41+
- name: Generate Paperclip config
42+
run: |
43+
mkdir -p ~/.paperclip/instances/default
44+
cat > ~/.paperclip/instances/default/config.json << 'CONF'
45+
{
46+
"$meta": { "version": 1, "updatedAt": "2026-01-01T00:00:00.000Z", "source": "onboard" },
47+
"database": { "mode": "embedded-postgres" },
48+
"logging": { "mode": "file" },
49+
"server": { "deploymentMode": "local_trusted", "host": "127.0.0.1", "port": 3100 },
50+
"auth": { "baseUrlMode": "auto" },
51+
"storage": { "provider": "local_disk" },
52+
"secrets": { "provider": "local_encrypted", "strictMode": false }
53+
}
54+
CONF
55+
56+
- name: Run e2e tests
57+
env:
58+
PAPERCLIP_E2E_SKIP_LLM: "true"
59+
run: pnpm run test:e2e
60+
61+
- name: Upload Playwright report
62+
uses: actions/upload-artifact@v4
63+
if: always()
64+
with:
65+
name: playwright-report
66+
path: |
67+
tests/e2e/playwright-report/
68+
tests/e2e/test-results/
69+
retention-days: 14

tests/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineConfig({
2525
webServer: {
2626
command: `pnpm paperclipai run`,
2727
url: `${BASE_URL}/api/health`,
28-
reuseExistingServer: !!process.env.CI,
28+
reuseExistingServer: !process.env.CI,
2929
timeout: 120_000,
3030
stdout: "pipe",
3131
stderr: "pipe",

0 commit comments

Comments
 (0)