-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-actions.yaml
More file actions
28 lines (28 loc) · 925 Bytes
/
github-actions.yaml
File metadata and controls
28 lines (28 loc) · 925 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
jobs:
job-id:
runs-on: ubuntu-latest
services:
postgres:
image: docker.io/postgres:9.6-alpine
env:
POSTGRES_PASSWORD: hasura
POSTGRES_USER: hasura
POSTGRES_DB: hasura
ports:
- 5432:5432
hasura:
image: quay.io/twyla-ai/hasura-world-db:latest
env:
HASURA_GRAPHQL_DATABASE_URL: postgres://hasura:hasura@postgres:5432/hasura
HASURA_GRAPHQL_ADMIN_SECRET: secret
ports:
- 8080:8080
options: --restart on-failure
steps:
- uses: actions/checkout@v1
# you can also optionally wait for the service to be ready by adding this step
- name: Wait for hasura
run: |
timeout 300s bash -c \
'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:${{ job.services.hasura.ports[8080] }}/healthz)" != "200" ]]; do sleep 5; done' \
|| false