-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.77 KB
/
Copy pathtest.yml
File metadata and controls
67 lines (58 loc) · 1.77 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
64
65
66
67
# Lint + type-check + test the Python packages on every push/PR that touches
# them. The image-publish/release workflows assume this has passed.
name: Tests
on:
push:
branches:
- main
paths:
- "packages/ai-horde-service-alerts/**"
- "packages/horde-status-prober/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/test.yml"
pull_request:
paths:
- "packages/ai-horde-service-alerts/**"
- "packages/horde-status-prober/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/test.yml"
jobs:
test:
runs-on: ubuntu-latest
# Postgres so the Alembic parity test (tests/integration/test_migrations.py)
# runs for real instead of skipping.
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pw
POSTGRES_DB: horde_status
ports:
- "5432:5432"
options: >-
--health-cmd "pg_isready -U postgres -d horde_status"
--health-interval 5s
--health-timeout 5s
--health-retries 5
env:
HORDE_ALERTS_TEST_DATABASE_URL: postgresql+asyncpg://postgres:pw@localhost:5432/horde_status
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.11.2"
- name: ai-horde-service-alerts — lint, type-check, test
working-directory: packages/ai-horde-service-alerts
run: |
uv run ruff check src tests
uv run zuban check
uv run pytest -q
- name: horde-status-prober — lint, test
working-directory: packages/horde-status-prober
run: |
uv run ruff check src tests
uv run pytest -q