-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.41 KB
/
test.yml
File metadata and controls
54 lines (52 loc) · 1.41 KB
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
45
46
47
48
49
50
51
52
53
54
name: Test
on:
push
jobs:
test:
strategy:
matrix:
os:
- ubuntu-22.04
name: Test the Postgres Setup Action
runs-on: ${{ matrix.os }}
steps:
- name: Set up postgres
uses: ableco/action-postgres-setup@v2
with:
postgres-version: 13
- name: Initialize pgbench
run: |
sudo rm /usr/bin/pgbench
sudo ln -s /usr/lib/postgresql/13/bin/pgbench /usr/bin/pgbench
pgbench -U postgres -i -p 5432 -d postgres
pgbench -U postgres -c 10 -T 30 -S -n
docker:
env:
PGHOST: 127.0.0.1
DATABASE_HOST: 127.0.0.1
PGUSER: postgres
PGPASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pici_development
RAILS_ENV: development
REDIS_URL: redis://127.0.0.1:6379/0
services:
postgres:
image: postgres:13.9-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pici_development
ports: ["5432:5432"]
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
runs-on: ubuntu-20.04
steps:
- name: Initialize pgbench
run: |
pgbench -U postgres -i -p 5432 -d postgres
pgbench -U postgres -c 10 -T 30 -S -n