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:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: readur
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: readur
|
||||||
POSTGRES_DB: readur_test
|
POSTGRES_DB: readur
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
options: >-
|
||||||
|
|
@ -78,7 +78,7 @@ jobs:
|
||||||
- name: Build backend
|
- name: Build backend
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/readur_test
|
DATABASE_URL: postgres://readur:readur@localhost:5432/readur
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
|
|
@ -92,7 +92,7 @@ jobs:
|
||||||
./target/release/readur &
|
./target/release/readur &
|
||||||
echo $! > backend.pid
|
echo $! > backend.pid
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/readur_test
|
DATABASE_URL: postgres://readur:readur@localhost:5432/readur
|
||||||
JWT_SECRET: test-secret-key
|
JWT_SECRET: test-secret-key
|
||||||
PORT: 8000
|
PORT: 8000
|
||||||
FRONTEND_PATH: ./frontend/dist
|
FRONTEND_PATH: ./frontend/dist
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ jobs:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: readur
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: readur
|
||||||
POSTGRES_DB: readur_test
|
POSTGRES_DB: readur
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
options: >-
|
||||||
|
|
@ -125,7 +125,7 @@ jobs:
|
||||||
|
|
||||||
- name: Wait for PostgreSQL to be ready
|
- name: Wait for PostgreSQL to be ready
|
||||||
run: |
|
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..."
|
echo "Waiting for PostgreSQL..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
@ -134,7 +134,7 @@ jobs:
|
||||||
- name: Verify database connection
|
- name: Verify database connection
|
||||||
run: |
|
run: |
|
||||||
echo "Testing database connection..."
|
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!"
|
echo "Database connection successful!"
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue