Skip to content

Commit 4607b74

Browse files
committed
chore: add postgres version to tests workflow
1 parent d40877e commit 4607b74

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/run-tests.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,35 @@ jobs:
2626

2727
services:
2828
postgres:
29-
image: postgres
29+
image: postgres:14
3030
env:
3131
POSTGRES_USER: codex
3232
POSTGRES_DB: notes
3333
POSTGRES_PASSWORD: postgres
34-
# ports:
35-
# - 127.0.0.1:5432:5432
34+
ports:
35+
- 127.0.0.1:5432:5432
3636
options: >-
3737
--health-cmd pg_isready
3838
--health-interval 10s
3939
--health-timeout 5s
4040
--health-retries 5
41-
# volumes:
42-
# - ./database:/var/lib/postgresql/data
41+
volumes:
42+
- ./database:/var/lib/postgresql/data
4343

4444
steps:
45-
- name: Checkout Repository
46-
uses: actions/checkout@v4
47-
with:
48-
ref: ${{ matrix.branch }}
4945
- name: Wait for PostgreSQL
5046
uses: jakejarvis/wait-action@master
5147
with:
5248
time: '20s'
49+
5350
- name: Make runner the owner of database folder
5451
run: sudo chown -R $USER database
52+
53+
- name: Checkout Repository
54+
uses: actions/checkout@v4
55+
with:
56+
ref: ${{ matrix.branch }}
57+
5558
- name: Setup node
5659
uses: actions/setup-node@v3
5760
with:

0 commit comments

Comments
 (0)