Skip to content

Commit 4a40164

Browse files
fix: add ci for postgreSQL
1 parent 7ef8bf6 commit 4a40164

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/rust.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ jobs:
1919

2020
runs-on: ubuntu-latest
2121

22+
services:
23+
postgres:
24+
image: postgres
25+
env:
26+
POSTGRES_PASSWORD: postgres
27+
ports:
28+
- 5432:5432
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
2235
steps:
2336
- uses: actions/checkout@v4
2437
- name: Cache Cargo registry
@@ -62,6 +75,8 @@ jobs:
6275
6376
- name: Run tests
6477
working-directory: rook
78+
env:
79+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
6580
run: |
6681
cargo test --verbose > ../test-log.txt 2>&1
6782
TEST_STATUS=$?

0 commit comments

Comments
 (0)