Skip to content

Commit

Permalink
Add Playwright test for GitHub, update Django one
Browse files Browse the repository at this point in the history
Gonna automatically delete these files on setup.
  • Loading branch information
trey committed Jul 12, 2023
1 parent 5e5184b commit 156edc5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
File renamed without changes.
47 changes: 47 additions & 0 deletions .github/workflows/blaze-playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Playwright Tests for App Built with Starter Kit
on: [push, pull_request]
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DEBUG: ${{ secrets.DEBUG }}
ALLOWED_HOSTS: ${{ secrets.ALLOWED_HOSTS }}
CSRF_TRUSTED_ORIGINS: ${{ secrets.CSRF_TRUSTED_ORIGINS }}
EMAIL_BACKEND: ${{ secrets.EMAIL_BACKEND }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
EMAIL_USE_TLS: ${{ secrets.EMAIL_USE_TLS }}
PLAYWRIGHT_USERNAME: ${{ secrets.PLAYWRIGHT_USERNAME }}
PLAYWRIGHT_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }}
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Django bits
run: |
python3 -m venv --prompt . venv
venv/bin/pip install -U pip setuptools wheel
venv/bin/python -m pip install -r requirements/requirements.txt
venv/bin/python manage.py migrate --noinput
venv/bin/python manage.py loaddata e2e/django-fixtures.json
npm install
npm run build
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: CREATE_USER=True npx playwright test --ignore-snapshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts
path: |
playwright-report/
test-results/
retention-days: 2
1 change: 1 addition & 0 deletions e2e/django-fixtures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]

0 comments on commit 156edc5

Please sign in to comment.