Moving the postgres container to Cypress test setup

This commit is contained in:
Arpit Mohan 2020-11-04 00:32:42 +05:30
parent fba99c4728
commit 4f094ea779
2 changed files with 6 additions and 14 deletions

View File

@ -106,20 +106,6 @@ jobs:
image: mongo
ports:
- 27017:27017
# This is required in Cypress tests that test the datasource integrations
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# Set health checks to wait until postgres has started
# Also initialize the docker container with data
options: >-
--name postgres
-v ${{ github.workspace }}/app/client/cypress/init-pg-dump-for-test.sql:/docker-entrypoint-initdb.d/init-pg-dump-for-test.sql
steps:
# Checkout the code

View File

@ -67,6 +67,12 @@ curl -k --request POST -v 'https://dev.appsmith.com/api/v1/users' \
"password": "'"$CYPRESS_TESTPASSWORD2"'"
}'
sudo docker run --network host --name postgres -d -p 5432:5432 \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
-v `pwd`/cypress/init-pg-dump-for-test.sql:/docker-entrypoint-initdb.d/init-pg-dump-for-test.sql \
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 \
postgres:latest
# DEBUG=cypress:* $(npm bin)/cypress version
# sed -i -e "s|api_url:.*$|api_url: $CYPRESS_URL|g" /github/home/.cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml
# cat /github/home/.cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml