Skip to content

E2E (Playwright)

E2E (Playwright) #3

Workflow file for this run

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