-
Notifications
You must be signed in to change notification settings - Fork 6
30 lines (30 loc) · 805 Bytes
/
Copy pathpostgres.yml
File metadata and controls
30 lines (30 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: PostgreSQL
on: push
jobs:
postgres:
runs-on: ubuntu-latest
container: node:latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres_db
POSTGRES_PASSWORD: postgres_password
POSTGRES_PORT: 5432
POSTGRES_USER: postgres_user
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install PostgreSQL client
run: |
apt-get update
apt-get install --yes postgresql-client
- name: Query database
run: psql -h postgres -d postgres_db -U postgres_user -c 'SELECT 1;'
env:
PGPASSWORD: postgres_password