Skip to content

frontend-v1

frontend-v1 #720

Workflow file for this run

name: Test
on:
push:
pull_request:
branches: [main, stripe]
workflow_dispatch:
workflow_call:
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: uv sync --all-extras --dev
- name: Run linting with ruff
run: uv run ruff check .
- name: Run type checking with ty
run: uv run ty check .
- name: Install Playwright browsers
run: uv run playwright install --with-deps chromium
- name: Run tests with pytest
env:
DB_HOST: localhost
DB_PORT: "5432"
DB_NAME: db
DB_USER: postgres
DB_PASSWORD: postgres
SECRET_KEY: test-secret-key-that-is-at-least-32-bytes-long
BASE_URL: http://localhost:8000
# Required on the stripe branch (billing always on); harmless on main.
STRIPE_SECRET_KEY: sk_test_dummy
STRIPE_WEBHOOK_SECRET: whsec_test_dummy
STRIPE_PRICE_ID: price_test_dummy
run: uv run pytest tests/