Skip to content

Commit

Permalink
test: seperated envs for keploy tests in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-t-97 committed Jun 18, 2024
1 parent acc3397 commit 070469f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .env.keploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DB_URI=postgres://reporting_dashboard_role:reportingdashboard123@localhost:5432/reporting_dashboard_dev
POSTGRES_HOST=0.0.0.0
POSTGRES_DB=reporting_dashboard_dev
POSTGRES_USER=reporting_dashboard_role
POSTGRES_PASSWORD=reportingdashboard123
NODE_ENV=local
ACCESS_TOKEN_SECRET=4cd7234152590dcfe77e1b6fc52e84f4d30c06fddadd0dd2fb42cbc51fa14b1bb195bbe9d72c9599ba0c6b556f9bd1607a8478be87e5a91b697c74032e0ae7af
REDIS_HOST=localhost
REDIS_PORT=6379
BUILD_NAME=docker
POSTGRES_PORT=5432
NODE_ENV=production
ENVIRONMENT_NAME=keploy
APP_PATH=/home/runner/work/node-express-graphql-template/node-express-graphql-template
ENABLE_DEDUP=false
1 change: 1 addition & 0 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ POSTGRES_PORT=5432
NODE_ENV=production
ENVIRONMENT_NAME=local
APP_PATH=/Users/apple/repos/node-express-graphql-template
ENABLE_DEDUP=false
4 changes: 2 additions & 2 deletions .github/workflows/test_workflows/keploy.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
curl --silent -O -L https://keploy.io/ent/install.sh


sudo docker compose -f keploy-docker-compose.yml build
sudo docker compose -f keploy-docker-compose.yml --env-file .env.keploy build
export KEPLOY_API_KEY=Iba1IAlh+GKnXPzYeA==
curl --silent -o keployE --location "https://keploy-enterprise.s3.us-west-2.amazonaws.com/releases/latest/enterprise_linux_amd64"
sudo chmod a+x keployE && sudo mkdir -p /usr/local/bin && sudo mv keployE /usr/local/bin
Expand All @@ -11,7 +11,7 @@ sudo chmod a+x keployE && sudo mkdir -p /usr/local/bin && sudo mv keployE /usr/l
echo "Project built successfully"


sudo -E env PATH="$PATH" /usr/local/bin/keployE test -c "sudo docker compose -f keploy-docker-compose.yml up" --containerName "custom_app" --delay 30 --apiTimeout 300 --generateGithubActions=false --coverage=true
sudo -E env PATH="$PATH" /usr/local/bin/keployE test -c "sudo docker compose -f keploy-docker-compose.yml --env-file .env.keploy up" --containerName "custom_app" --delay 30 --apiTimeout 300 --generateGithubActions=false --coverage=true
echo "Keploy started in test mode"

all_passed=true
Expand Down
4 changes: 2 additions & 2 deletions keploy-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ services:
context: .
args:
BUILD_NAME: keploy
APP_PATH: /home/runner/work/node-express-graphql-template/node-express-graphql-template
APP_PATH: ${APP_PATH}
ports:
- 9000:9000
env_file:
- .env.local
- .env.${ENVIRONMENT_NAME}
networks:
- keploy-network
volumes:
Expand Down

0 comments on commit 070469f

Please sign in to comment.