-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.68 KB
/
e2e.yml
File metadata and controls
56 lines (47 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: E2E (Playwright)
# Runs only on-demand for now. Spinning a full DreamFactory stack in GH
# Actions requires a shared df-docker image + secrets wiring that doesn't
# exist yet; wiring it up is tracked as a follow-up. Until then this job
# is driven by manual dispatch (pass a target URL) or a nightly cron
# against a long-running instance (URL in the E2E_NIGHTLY_URL secret).
on:
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
target_url:
description: 'Base URL to run E2E against (e.g. http://crucible.example:8080)'
required: true
jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
- run: npm ci
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
- name: Resolve target URL
id: target
run: |
if [ -n "${{ github.event.inputs.target_url }}" ]; then
echo "url=${{ github.event.inputs.target_url }}" >> "$GITHUB_OUTPUT"
else
echo "url=${{ secrets.E2E_NIGHTLY_URL }}" >> "$GITHUB_OUTPUT"
fi
- name: Run Playwright tests
env:
PLAYWRIGHT_BASE_URL: ${{ steps.target.outputs.url }}
DF_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL || 'admin@dreamfactory.com' }}
DF_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD || 'passwordpassword' }}
run: npm run e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7