tracksolid_timescale_grafan.../.forgejo/workflows/ci-tests.yml
David Kiania 6ed4d3a1e2 test: add test suite - unit tests, webhook endpoint tests, and CI workflow
57 unit tests covering clean helpers, API signing, and field mapping fixes
(FIX-E06, FIX-M16, BUG-01, BUG-03); integration tests for webhook endpoints
with mocked DB; Forgejo CI workflow with TimescaleDB service container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:38:20 +03:00

40 lines
1.1 KiB
YAML

name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: self-hosted
services:
timescaledb:
image: timescale/timescaledb-ha:pg16-ts2.15
env:
POSTGRES_PASSWORD: test
POSTGRES_DB: tracksolid_test
POSTGRES_USER: postgres
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install pytest pytest-asyncio httpx psycopg2-binary requests \
fastapi uvicorn python-multipart
- name: Run tests
run: pytest tests/ -v --tb=short
env:
TRACKSOLID_APP_KEY: test_key
TRACKSOLID_APP_SECRET: test_secret
TRACKSOLID_USER_ID: test_user
TRACKSOLID_PWD_MD5: test_md5
DATABASE_URL: postgresql://postgres:test@localhost:5433/tracksolid_test
TEST_DATABASE_URL: postgresql://postgres:test@localhost:5433/tracksolid_test
JIMI_WEBHOOK_TOKEN: ""