@@ -130,10 +130,84 @@ jobs:
130130 uv pip install twine
131131 twine check dist/*
132132
133+ e2e-tests :
134+ name : E2E Tests
135+ runs-on : ubuntu-latest
136+ needs : [lint, test]
137+ services :
138+ postgres :
139+ image : postgres:15-alpine
140+ env :
141+ POSTGRES_USER : test_user
142+ POSTGRES_PASSWORD : test_password
143+ POSTGRES_DB : test_db
144+ ports :
145+ - 5432:5432
146+ options : >-
147+ --health-cmd pg_isready
148+ --health-interval 10s
149+ --health-timeout 5s
150+ --health-retries 5
151+ steps :
152+ - name : Checkout code
153+ uses : actions/checkout@v4
154+
155+ - name : Set up Python
156+ uses : actions/setup-python@v5
157+ with :
158+ python-version : ${{ env.PYTHON_VERSION }}
159+
160+ - name : Install uv
161+ run : pip install uv
162+
163+ - name : Cache uv dependencies
164+ uses : actions/cache@v4
165+ with :
166+ path : ~/.cache/uv
167+ key : ${{ runner.os }}-uv-e2e-${{ hashFiles('requirements.txt') }}
168+ restore-keys : |
169+ ${{ runner.os }}-uv-e2e-
170+ ${{ runner.os }}-uv-
171+
172+ - name : Install dependencies
173+ run : |
174+ uv pip install -r requirements.txt
175+ uv pip install aiosqlite asyncpg aiomysql
176+
177+ - name : Run E2E tests
178+ env :
179+ E2E_TESTS_ENABLED : " true"
180+ E2E_DATABASE_URL : " postgresql+asyncpg://test_user:test_password@localhost:5432/test_db"
181+ DATABASE_URL : " postgresql+asyncpg://test_user:test_password@localhost:5432/test_db"
182+ SECRET_KEY : " e2e-test-secret-key"
183+ AUTH_ENABLED : " true"
184+ JWT_AUTH_ENABLED : " true"
185+ API_KEY_AUTH_ENABLED : " true"
186+ API_KEYS : " test-api-key:read|write|admin"
187+ AGENT_ENABLED : " true"
188+ MULTIDB_ENABLED : " true"
189+ CACHE_ENABLED : " false"
190+ run : |
191+ pytest tests/e2e/ -v --tb=short -m "e2e" --ignore=tests/e2e/test_performance_e2e.py
192+
193+ - name : Run E2E performance tests
194+ env :
195+ E2E_TESTS_ENABLED : " true"
196+ E2E_DATABASE_URL : " postgresql+asyncpg://test_user:test_password@localhost:5432/test_db"
197+ DATABASE_URL : " postgresql+asyncpg://test_user:test_password@localhost:5432/test_db"
198+ SECRET_KEY : " e2e-test-secret-key"
199+ AUTH_ENABLED : " true"
200+ API_KEY_AUTH_ENABLED : " true"
201+ API_KEYS : " test-api-key:read|write|admin"
202+ MULTIDB_ENABLED : " true"
203+ CACHE_ENABLED : " false"
204+ run : |
205+ pytest tests/e2e/test_performance_e2e.py -v --tb=short -m "e2e_performance"
206+
133207 docker :
134208 name : Docker Build & Push
135209 runs-on : ubuntu-latest
136- needs : [lint, test]
210+ needs : [lint, test, e2e-tests ]
137211 if : github.event_name == 'push'
138212 permissions :
139213 contents : read
0 commit comments