Skip to content

Commit d7ac15c

Browse files
committed
feat: Enhance testing framework with new functional tests and CI integration
- Added new functional tests for client replay and generated artifacts to ensure compatibility with live API. - Introduced integration tests for mounted file edits to verify persistence of changes. - Updated pytest markers in `pyproject.toml` for better test categorization. - Enhanced GitHub Actions workflow to include integration tests alongside existing unit tests. - Revised documentation to reflect new test organization and execution strategies.
1 parent 4f62f03 commit d7ac15c

12 files changed

Lines changed: 825 additions & 1989 deletions

.github/workflows/lint.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,64 @@ jobs:
4646
run: |
4747
pytest tests/unit/
4848
49+
- name: Run Integration Tests
50+
run: |
51+
pytest tests/integration/
52+
53+
functional-live:
54+
runs-on: ubuntu-latest
55+
timeout-minutes: 75
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Set up Python
60+
uses: actions/setup-python@v6
61+
with:
62+
python-version: "3.11"
63+
cache: "pip"
64+
65+
- name: Install dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
pip install -r requirements.txt
69+
pip install pytest pytest-asyncio pytest-cov pytest-mock
70+
71+
- name: Prepare environment
72+
run: |
73+
cp .env.example .env
74+
75+
- name: Start live test stack
76+
run: |
77+
docker compose up -d --build
78+
79+
- name: Wait for API health
80+
run: |
81+
for i in $(seq 1 24); do
82+
if curl -fs http://localhost:8000/health >/dev/null; then
83+
exit 0
84+
fi
85+
sleep 5
86+
done
87+
docker compose logs --no-color api
88+
exit 1
89+
90+
- name: Run Functional Live API Tests
91+
env:
92+
API_BASE: http://localhost:8000
93+
API_KEY: your-secure-api-key-here-change-this-in-production
94+
run: |
95+
pytest tests/functional/ -m live_api -v
96+
97+
- name: Dump stack logs on failure
98+
if: failure()
99+
run: |
100+
docker compose logs --no-color
101+
102+
- name: Stop live test stack
103+
if: always()
104+
run: |
105+
docker compose down -v
106+
49107
docker-build:
50108
runs-on: ubuntu-latest
51109
steps:

0 commit comments

Comments
 (0)