Skip to content

Commit 7fd677a

Browse files
committed
action add postgres service
1 parent c45c0ee commit 7fd677a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ jobs:
99
build:
1010
name: Build
1111
runs-on: ubuntu-latest
12+
services:
13+
postgres:
14+
image: postgres:13
15+
env:
16+
POSTGRES_USER: postgres
17+
POSTGRES_PASSWORD: postgres
18+
POSTGRES_DB: mydb
19+
ports:
20+
- 5432:5432
21+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1222
steps:
1323
- uses: actions/checkout@v2
1424
with:
@@ -17,12 +27,6 @@ jobs:
1727
uses: actions/setup-java@v1
1828
with:
1929
java-version: 8
20-
- name: Set up postgres
21-
uses: harmon758/postgresql-action@v1
22-
with:
23-
postgresql version: '11'
24-
- name: Create DB
25-
run: psql -c 'create database mydb;' -U postgres
2630
- name: Cache SonarCloud packages
2731
uses: actions/cache@v1
2832
with:

0 commit comments

Comments
 (0)