parent
9c8db14086
commit
887515b333
1 changed files with 14 additions and 1 deletions
|
@ -8,6 +8,19 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
mydb:
|
||||||
|
image: postgres:latest
|
||||||
|
# container_name: mydb
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: alice
|
||||||
|
POSTGRES_PASSWORD: iEx4Vj7zBb6
|
||||||
|
POSTGRES_DB: tethys_dev
|
||||||
|
ports:
|
||||||
|
# Maps tcp port 5432 on service container to the host
|
||||||
|
- 5432:5432
|
||||||
|
# Set health checks to wait until postgres has started
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -25,7 +38,7 @@ jobs:
|
||||||
|
|
||||||
- name: Set up environment variables
|
- name: Set up environment variables
|
||||||
run: echo "DB_CONNECTION=pg" >> .env.test
|
run: echo "DB_CONNECTION=pg" >> .env.test
|
||||||
&& echo "PG_HOST=172.17.0.2" >> .env.test
|
&& echo "PG_HOST=mydb" >> .env.test
|
||||||
&& echo "PG_PORT=5432" >> .env.test
|
&& echo "PG_PORT=5432" >> .env.test
|
||||||
&& echo "PG_USER=alice" >> .env.test
|
&& echo "PG_USER=alice" >> .env.test
|
||||||
&& echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test
|
&& echo "PG_PASSWORD=iEx4Vj7zBb6" >> .env.test
|
||||||
|
|
Loading…
Add table
Reference in a new issue