Skip to content

Commit 561f351

Browse files
cbartzgabriel-samfira
authored andcommitted
ci: back postgres test data dir with tmpfs to avoid test timeout
1 parent c821b29 commit 561f351

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/go-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,17 @@ jobs:
9595
POSTGRES_DB: garm
9696
ports:
9797
- 5432:5432
98+
# Back the data directory with tmpfs (RAM). The test suite creates a
99+
# fresh schema and runs the full migration for every test case, so the
100+
# default disk-backed, fsync-on container makes the run slow enough to
101+
# hit the test timeout. This database is ephemeral, so trading
102+
# durability for speed is safe.
98103
options: >-
99104
--health-cmd pg_isready
100105
--health-interval 10s
101106
--health-timeout 5s
102107
--health-retries 5
108+
--tmpfs /var/lib/postgresql/data
103109
104110
steps:
105111
- name: Install dependencies

0 commit comments

Comments
 (0)