mirror of
https://github.com/EDeev/tablo.git
synced 2026-10-07 20:49:31 +03:00
34 lines
845 B
YAML
34 lines
845 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_USER: tablo
|
|
POSTGRES_PASSWORD: tablo
|
|
POSTGRES_DB: tablo_test
|
|
ports: ["5432:5432"]
|
|
options: >-
|
|
--health-cmd "pg_isready -U tablo" --health-interval 5s --health-retries 10
|
|
env:
|
|
TEST_DATABASE_URL: postgresql://tablo:tablo@localhost:5432/tablo_test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
cache-dependency-path: requirements-dev.txt
|
|
- run: pip install -r requirements-dev.txt
|
|
- name: Ruff
|
|
run: ruff check .
|
|
- name: Тесты
|
|
run: pytest -q
|