Skip to content

Commit 67f6edc

Browse files
ci: add prostgress service
1 parent f03b957 commit 67f6edc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ jobs:
3030
name: Test
3131
runs-on: ubuntu-latest
3232
needs: setup
33+
services:
34+
postgres:
35+
image: postgres:10.8
36+
env:
37+
POSTGRES_USER: postgres
38+
POSTGRES_PASSWORD: postgres
39+
POSTGRES_DB: postgres
40+
ports:
41+
- 5432:5432
42+
# needed because the postgres container does not provide a healthcheck
43+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
3344
steps:
3445
- name: Checkout
3546
uses: actions/checkout@v2
@@ -50,6 +61,11 @@ jobs:
5061
- name: Lint
5162
run: yarn lint
5263
- name: Test
64+
env:
65+
NODE_ENV: test
66+
POSTGRES_PASSWORD: postgres
67+
POSTGRES_DATABASE: postgres
68+
POSTGRES_USER: postgres
5369
run: yarn test
5470

5571
publish:

0 commit comments

Comments
 (0)