Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup postgres service container in CI #502

Merged
merged 1 commit into from May 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Expand Up @@ -78,6 +78,30 @@ jobs:
- name: Test Gnomock connection
run: curl localhost:23042/stop -d '{"id":"42"}'

test-service-containers:
name: "[core] service container"
runs-on: ubuntu-latest
services:
gnomock:
image: orlangure/gnomock:v0.20.0
options: -v /var/run/docker.sock:/var/run/docker.sock
ports:
- 23042:23042
steps:
- name: Setup postgres
run: |
brew install httpie
http --ignore-stdin -v :23042/start/postgres options[custom_named_ports][default][protocol]=tcp options[custom_named_ports][default][port]:=5432 options[custom_named_ports][default][host_port]:=15432 options[debug]:=true

- name: Connect 1
run: PGPASSWORD=password psql -h 127.0.0.1 -U postgres -p 15432 -c "select 1;"

- name: Connect 2
run: PGPASSWORD=password psql -h 127.0.0.1 -U postgres -p 15432 -c "select 1;"

- name: Connect 3
run: PGPASSWORD=password psql -h 127.0.0.1 -U postgres -p 15432 -c "select 1;"

test-localstack:
name: "[preset] localstack"
runs-on: ubuntu-latest
Expand Down