fix(ci): also update database url for tests in ci
This commit is contained in:
parent
65f42c2cd7
commit
c994940453
|
|
@ -21,9 +21,9 @@ jobs:
|
|||
postgres:
|
||||
image: postgres:17
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: readur_test
|
||||
POSTGRES_USER: readur
|
||||
POSTGRES_PASSWORD: readur
|
||||
POSTGRES_DB: readur
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
|
|
@ -78,7 +78,7 @@ jobs:
|
|||
- name: Build backend
|
||||
run: cargo build --release
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/readur_test
|
||||
DATABASE_URL: postgres://readur:readur@localhost:5432/readur
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
- name: Build frontend
|
||||
|
|
@ -92,7 +92,7 @@ jobs:
|
|||
./target/release/readur &
|
||||
echo $! > backend.pid
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/readur_test
|
||||
DATABASE_URL: postgres://readur:readur@localhost:5432/readur
|
||||
JWT_SECRET: test-secret-key
|
||||
PORT: 8000
|
||||
FRONTEND_PATH: ./frontend/dist
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ jobs:
|
|||
postgres:
|
||||
image: postgres:17
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: readur_test
|
||||
POSTGRES_USER: readur
|
||||
POSTGRES_PASSWORD: readur
|
||||
POSTGRES_DB: readur
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
|
|
@ -125,7 +125,7 @@ jobs:
|
|||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
run: |
|
||||
until pg_isready -h localhost -p 5432 -U postgres; do
|
||||
until pg_isready -h localhost -p 5432 -U readur; do
|
||||
echo "Waiting for PostgreSQL..."
|
||||
sleep 1
|
||||
done
|
||||
|
|
@ -134,7 +134,7 @@ jobs:
|
|||
- name: Verify database connection
|
||||
run: |
|
||||
echo "Testing database connection..."
|
||||
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d readur_test -c "SELECT version();"
|
||||
PGPASSWORD=readur psql -h localhost -p 5432 -U readur -d readur -c "SELECT version();"
|
||||
echo "Database connection successful!"
|
||||
|
||||
- name: Run integration tests
|
||||
|
|
|
|||
Loading…
Reference in New Issue