Make sure postgres env variables for test stage are consistent
Some checks failed
Some checks failed
This commit is contained in:
parent
40cd2f4797
commit
2e5fb1e212
3 changed files with 6 additions and 6 deletions
|
@ -77,7 +77,7 @@ jobs:
|
|||
|
||||
- name: Validate migration files
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/sharenet_test
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sharenet_test
|
||||
run: |
|
||||
# Wait for PostgreSQL to be ready
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
|
@ -95,7 +95,7 @@ jobs:
|
|||
- name: Run backend tests
|
||||
working-directory: ./backend
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/sharenet_test
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sharenet_test
|
||||
run: |
|
||||
# Run tests with increased parallelism for Rust
|
||||
docker exec ci-dind docker exec ci-cd-test-rust cargo test --all --jobs 4
|
||||
|
|
|
@ -23,13 +23,13 @@ CREATE DATABASE sharenet_test;
|
|||
Set the `DATABASE_URL` environment variable:
|
||||
|
||||
```bash
|
||||
export DATABASE_URL="postgres://username:password@localhost:5432/sharenet_test"
|
||||
export DATABASE_URL="postgres://postgres:password@localhost:5432/sharenet_test"
|
||||
```
|
||||
|
||||
Or create a `.env` file in the postgres crate directory:
|
||||
|
||||
```env
|
||||
DATABASE_URL=postgres://username:password@localhost:5432/sharenet_test
|
||||
DATABASE_URL=postgres://postgres:password@localhost:5432/sharenet_test
|
||||
```
|
||||
|
||||
### 3. SQLx Setup
|
||||
|
@ -199,7 +199,7 @@ Example GitHub Actions setup:
|
|||
|
||||
- name: Run Postgres Tests
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/sharenet_test
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/sharenet_test
|
||||
run: |
|
||||
cd backend/crates/postgres
|
||||
cargo test
|
||||
|
|
|
@ -9,7 +9,7 @@ services:
|
|||
environment:
|
||||
POSTGRES_DB: sharenet_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
|
|
Loading…
Add table
Reference in a new issue