Skip to content

Commit 6e8c72b

Browse files
authored
Merge pull request #129 from djmitche/postgres
Add `taskchampion-sync-server-storage-postgres`
2 parents 816c9a3 + 609660b commit 6e8c72b

File tree

11 files changed

+1230
-7
lines changed

11 files changed

+1230
-7
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ jobs:
106106
- uses: obi1kenobi/cargo-semver-checks-action@v2
107107
with:
108108
# exclude the binary package from semver checks, since it is not published as a crate.
109-
exclude: taskchampion-sync-server
109+
# exclude postgres temporarily until it is released
110+
exclude: taskchampion-sync-server,taskchampion-sync-server-storage-postgres
110111

111112
mdbook:
112113
runs-on: ubuntu-latest

.github/workflows/rust-tests.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,32 @@ jobs:
1111
test:
1212
strategy:
1313
matrix:
14+
postgres:
15+
- "17"
1416
rust:
1517
# MSRV
16-
- "1.82.0"
18+
- "1.85.0"
1719
- "stable"
1820

1921
runs-on: ubuntu-latest
20-
name: "rust ${{ matrix.rust }}"
22+
name: "rust ${{ matrix.rust }} / postgres ${{ matrix.postgres }}"
23+
24+
services:
25+
# Service container for PostgreSQL
26+
postgres:
27+
image: "postgres:${{ matrix.postgres }}"
28+
env:
29+
POSTGRES_DB: test_db
30+
POSTGRES_USER: test_user
31+
POSTGRES_PASSWORD: test_password
32+
ports:
33+
- 5432:5432
34+
# Set health checks to ensure Postgres is ready before the job starts
35+
options: >-
36+
--health-cmd pg_isready
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
2140
2241
steps:
2342
- uses: actions/checkout@v4
@@ -40,4 +59,6 @@ jobs:
4059
override: true
4160

4261
- name: test
62+
env:
63+
TEST_DB_URL: postgresql://test_user:test_password@localhost:5432/test_db
4364
run: cargo test

0 commit comments

Comments
 (0)