Skip to content

Commit 9e59fee

Browse files
committed
Add running server with postgres to CI
1 parent 756a623 commit 9e59fee

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,33 @@ jobs:
131131
- name: Check benchmarks
132132
run: sh -x -c "ci/check-profiling.sh"
133133

134+
database-check-postgres:
135+
name: Database Check (postgres)
136+
runs-on: ubuntu-latest
137+
services:
138+
postgres:
139+
image: postgres
140+
env:
141+
POSTGRES_PASSWORD: postgres
142+
options: >-
143+
--health-cmd pg_isready
144+
--health-interval 10s
145+
--health-timeout 5s
146+
--health-retries 5
147+
ports:
148+
- 5432:5432
149+
150+
steps:
151+
- name: Check out repository code
152+
uses: actions/checkout@v2
153+
154+
- name: Install stable
155+
uses: actions-rs/toolchain@v1
156+
with:
157+
toolchain: stable
158+
159+
- name: Connect to PostgreSQL
160+
run: |
161+
cargo build --bin site --release
162+
timeout 5s cargo run --bin site --release 'postgresql://postgres:postgres@localhost:5432/postgres' 2>&1 | tee -a log || true
163+
grep -Fxq "Loading complete but no data identified; exiting." log

0 commit comments

Comments
 (0)