name: ci on: push: branches: [main] pull_request: jobs: backend: runs-on: ubuntu-latest services: postgres: image: postgres:17-alpine env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: >- --health-cmd "pg_isready -U postgres" --health-interval 5s --health-timeout 3s --health-retries 20 defaults: run: working-directory: backend steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v5 with: enable-cache: true - run: uv python install 3.12 - run: uv sync --frozen - run: uv run ruff check . - run: uv run ruff format --check . - run: uv run pyright - name: tests run: uv run pytest -q env: # tests spawn their own postgres via pg_ctl; the client tools come from the OS package PATH: /usr/lib/postgresql/17/bin:${{ env.PATH }} - name: openapi drift run: | uv run fintracker openapi /tmp/openapi.json diff -u ../openapi/openapi.json /tmp/openapi.json