-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 1.57 KB
/
ci.yml
File metadata and controls
63 lines (55 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: xmlsvc
POSTGRES_PASSWORD: xmlsvc
POSTGRES_DB: xmlsvc
ports: ["5432:5432"]
options: >-
--health-cmd="pg_isready -U xmlsvc"
--health-interval=10s
--health-timeout=5s
--health-retries=5
minio:
image: bitnami/minio:latest
ports: ["9000:9000"]
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_DEFAULT_BUCKETS: xmlsvc
options: >-
--health-cmd="curl -fsS http://localhost:9000/minio/health/ready || exit 1"
--health-interval=5s
--health-timeout=5s
--health-retries=30
env:
PYTHONPATH: ${{ github.workspace }} # <— ключевой фикс
DATABASE_URL: postgresql+psycopg://xmlsvc:xmlsvc@localhost:5432/xmlsvc
S3_ENDPOINT: http://localhost:9000
S3_BUCKET: xmlsvc
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Alembic upgrade
run: python -m alembic upgrade head
- name: Run tests
run: pytest -q