Bump docker/metadata-action from 9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 to b798ed8388581f6f002541048b6458ca2c4ba442 #207
This file contains hidden or 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: Tests | |
on: | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Run tests | |
services: | |
postgres: | |
image: postgis/postgis:13-3.1-alpine | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
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@v6 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ".python-version" | |
- run: uv sync --locked --all-extras | |
- run: createdb jedeschule_test | |
env: | |
PGHOST: localhost | |
PGPASSWORD: postgres | |
PGPORT: 5432 | |
PGUSER: postgres | |
- run: | | |
set -e | |
uv run alembic upgrade head | |
uv run python test_models.py | |
env: | |
DATABASE_URL: postgresql://postgres:[email protected]:5432/jedeschule_test |