Compare commits
1 Commits
8d47c0c378
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| f0076ff1f4 |
36
.github/workflows/e2e-api-smoke.yml
vendored
36
.github/workflows/e2e-api-smoke.yml
vendored
@@ -17,21 +17,6 @@ jobs:
|
|||||||
name: Core API E2E Smoke
|
name: Core API E2E Smoke
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:16
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: nexapg
|
|
||||||
POSTGRES_USER: nexapg
|
|
||||||
POSTGRES_PASSWORD: nexapg
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
options: >-
|
|
||||||
--health-cmd "pg_isready -U nexapg -d nexapg"
|
|
||||||
--health-interval 5s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 20
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
APP_NAME: NexaPG Monitor
|
APP_NAME: NexaPG Monitor
|
||||||
ENVIRONMENT: test
|
ENVIRONMENT: test
|
||||||
@@ -62,6 +47,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
|
|
||||||
|
- name: Start PostgreSQL container
|
||||||
|
run: |
|
||||||
|
docker rm -f nexapg-e2e-pg >/dev/null 2>&1 || true
|
||||||
|
docker run -d \
|
||||||
|
--name nexapg-e2e-pg \
|
||||||
|
-e POSTGRES_DB=nexapg \
|
||||||
|
-e POSTGRES_USER=nexapg \
|
||||||
|
-e POSTGRES_PASSWORD=nexapg \
|
||||||
|
-p 5432:5432 \
|
||||||
|
postgres:16
|
||||||
|
|
||||||
- name: Install backend dependencies + test tooling
|
- name: Install backend dependencies + test tooling
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
@@ -94,6 +90,12 @@ jobs:
|
|||||||
asyncio.run(wait_for_db())
|
asyncio.run(wait_for_db())
|
||||||
PY
|
PY
|
||||||
|
|
||||||
|
- name: Show PostgreSQL container status
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
docker ps -a --filter "name=nexapg-e2e-pg"
|
||||||
|
docker logs --tail=80 nexapg-e2e-pg || true
|
||||||
|
|
||||||
- name: Run Alembic migrations
|
- name: Run Alembic migrations
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
run: alembic upgrade head
|
run: alembic upgrade head
|
||||||
@@ -102,3 +104,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PYTHONPATH: backend
|
PYTHONPATH: backend
|
||||||
run: pytest -q backend/tests/e2e/test_api_smoke.py
|
run: pytest -q backend/tests/e2e/test_api_smoke.py
|
||||||
|
|
||||||
|
- name: Cleanup PostgreSQL container
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: docker rm -f nexapg-e2e-pg >/dev/null 2>&1 || true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from functools import lru_cache
|
|||||||
from pydantic import field_validator
|
from pydantic import field_validator
|
||||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
|
|
||||||
NEXAPG_VERSION = "0.2.4"
|
NEXAPG_VERSION = "0.2.5"
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
|
|||||||
Reference in New Issue
Block a user