-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.11 KB
/
pgbouncer_postgresql.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and Test PgBouncer and PostgreSQL
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
docker:
image: docker:stable
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options: --privileged
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build and Start Containers
run: docker-compose up -d
- name: Verify PgBouncer is Running
run: |
apt-get update
apt-get install -y postgresql-client
until PGPASSWORD=password psql -h localhost -p 6432 -U pgbouncer -d pgbouncer -c 'SHOW STATS;'; do
sleep 1
done
echo "PgBouncer is working!"
- name: Stop Containers
run: docker-compose down