Skip to content

Test

Test #231

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- master
- development
schedule:
# See https://crontab.guru/weekly every sunday at 00:00
- cron: 0 0 * * 0
jobs:
test:
name: Run Linting and Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_BD: appdb
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install 3.12
- name: Install the project
run: uv sync --all-extras --dev
- name: Run Linting
run: |
uv run ruff format --check .;
uv run ruff check --diff .;
- name: Run Tests
env:
DATABASE_URL: postgresql+asyncpg://postgres:password@localhost:5432/appdb
EMAIL_FROM_ADDRESS: support@example.com
run: uv run pytest app