Skip to content

Commit cc7406d

Browse files
committed
fix(ci): use SQLite for E2E tests to match local setup
Use SQLite in-memory database for E2E tests in CI to avoid SQL dialect incompatibility (INSERT OR REPLACE is SQLite-specific). This matches the local test setup and simplifies the CI configuration. Removes the postgres service container as it's no longer needed.
1 parent 9e0bc0b commit cc7406d

1 file changed

Lines changed: 4 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,6 @@ jobs:
134134
name: E2E Tests
135135
runs-on: ubuntu-latest
136136
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
151137
steps:
152138
- name: Checkout code
153139
uses: actions/checkout@v4
@@ -177,8 +163,8 @@ jobs:
177163
- name: Run E2E tests
178164
env:
179165
E2E_TESTS_ENABLED: "true"
180-
E2E_DATABASE_URL: "postgresql://test_user:test_password@localhost:5432/test_db"
181-
DATABASE_URL: "postgresql://test_user:test_password@localhost:5432/test_db"
166+
E2E_DATABASE_URL: "sqlite:///:memory:"
167+
DATABASE_URL: "sqlite:///:memory:"
182168
SECRET_KEY: "e2e-test-secret-key"
183169
AUTH_ENABLED: "true"
184170
JWT_AUTH_ENABLED: "true"
@@ -193,8 +179,8 @@ jobs:
193179
- name: Run E2E performance tests
194180
env:
195181
E2E_TESTS_ENABLED: "true"
196-
E2E_DATABASE_URL: "postgresql://test_user:test_password@localhost:5432/test_db"
197-
DATABASE_URL: "postgresql://test_user:test_password@localhost:5432/test_db"
182+
E2E_DATABASE_URL: "sqlite:///:memory:"
183+
DATABASE_URL: "sqlite:///:memory:"
198184
SECRET_KEY: "e2e-test-secret-key"
199185
AUTH_ENABLED: "true"
200186
API_KEY_AUTH_ENABLED: "true"

0 commit comments

Comments
 (0)