Skip to content

Commit 998c309

Browse files
committed
Make concessions for Windows when running the testsuite (it does not support docker containers in githubs CI)
1 parent c0f241b commit 998c309

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@ jobs:
8383
test_on_windows:
8484
name: Test on Windows
8585
runs-on: windows-latest
86-
env:
87-
TEST_DB_URL: postgres://postgres:testpass@localhost:5432/postgres
88-
services:
89-
postgres:
90-
image: postgres:16-alpine
91-
env:
92-
POSTGRES_USER: postgres
93-
POSTGRES_PASSWORD: testpass
94-
POSTGRES_DB: postgres
95-
ports:
96-
- 5432:5432
9786
steps:
9887
- name: Checkout the source code
9988
uses: actions/checkout@v4

database/src/tests/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ where
9898
let ctx = f(ctx).await.expect("Test failed");
9999
ctx.finish().await;
100100
} else {
101-
panic!("Aborting; `TEST_DB_URL` was not passed");
101+
// The github CI does not yet support running containers on Windows,
102+
// meaning that the test suite would fail.
103+
if cfg!(unix) {
104+
panic!("Aborting; `TEST_DB_URL` was not passed");
105+
} else {
106+
eprintln!(
107+
"Skipping database test on platform {} `TEST_DB_URL` was not passed",
108+
std::env::consts::OS
109+
);
110+
}
102111
}
103112
}

0 commit comments

Comments
 (0)