ui(mfa): dont require button click to validate mfa, do automatically #4686
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "playwright" | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
LOG_LEVEL: ERROR | |
STATIC_DIR: | |
DATABASE_HOSTNAME: localhost | |
DATABASE_CREDENTIALS: dispatch:dispatch | |
DISPATCH_ENCRYPTION_KEY: NJHDWDJ3PbHT8h | |
DISPATCH_JWT_SECRET: foo | |
jobs: | |
end-to-end: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: dispatch | |
POSTGRES_PASSWORD: dispatch | |
POSTGRES_DB: dispatch | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install python dependencies | |
run: | | |
export DISPATCH_LIGHT_BUILD=1 | |
python -m pip install --upgrade pip | |
pip install psycopg[binary] | |
pip install -e ".[dev]" | |
- name: Install npm dependencies | |
run: | | |
npm ci -D --prefix src/dispatch/static/dispatch | |
npm install -D @playwright/test | |
- name: Install playwright browsers | |
run: npx playwright install --with-deps chromium | |
- name: Setup sample database | |
run: dispatch database restore --dump-file data/dispatch-sample-data.dump && dispatch database upgrade | |
- name: Run tests | |
run: npx playwright test --project=chromium | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |