Skip to content

Commit 9794974

Browse files
committed
test: docker-compose file to run postgres as Github Actions does
1 parent a922231 commit 9794974

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/tox.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ jobs:
1414
services:
1515
postgres:
1616
image: postgres
17+
1718
env:
1819
POSTGRES_PASSWORD: postgres
20+
1921
options: >-
2022
--health-cmd pg_isready
2123
--health-interval 10s
2224
--health-timeout 5s
2325
--health-retries 5
2426
27+
ports:
28+
- 5432:5432
29+
2530
steps:
2631
- uses: actions/checkout@v3
2732
- uses: actions/setup-python@v4

docker-compose.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Docker compose file to help with testing.
2+
#
3+
# Run:
4+
# docker-compose up
5+
# tox
6+
#
7+
# This setup is replicated in the Github Action
8+
9+
version: "3.4"
10+
11+
services:
12+
database:
13+
image: postgres
14+
15+
environment:
16+
POSTGRES_PASSWORD: postgres
17+
18+
ports:
19+
- "5432:5432"

0 commit comments

Comments
 (0)