Skip to content

Commit

Permalink
Added e2e tests GH action, with docker compose build
Browse files Browse the repository at this point in the history
  • Loading branch information
dividor committed Jun 29, 2024
1 parent 9a2ef14 commit 2248dd2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,21 @@ jobs:
env > .env
export DATA_DB_CONN_STRING="postgresql://${POSTGRES_DATA_USER}:${POSTGRES_DATA_PASSWORD}@${POSTGRES_DATA_HOST}:${POSTGRES_DATA_PORT}/${POSTGRES_DATA_DB}"
export POSTGRES_RECIPE_CONN_STRING="postgresql://${POSTGRES_RECIPE_USER}:${POSTGRES_RECIPE_PASSWORD}@${POSTGRES_RECIPE_HOST}:${POSTGRES_RECIPE_PORT}/${POSTGRES_RECIPE_DB}"
#docker buildx create --use --driver=docker-container
#docker buildx bake -f ./docker-compose.yml -f docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --set *.platform=linux/amd64 recipedb datadb server promptflow
docker compose -f docker-compose.yml -f docker-compose-dev.yml build recipedb datadb server promptflow
##docker buildx create --use --driver=docker-container
##docker buildx bake -f ./docker-compose.yml -f docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --set *.platform=linux/amd64 recipedb datadb server promptflow
#docker compose -f docker-compose.yml -f docker-compose-dev.yml build recipedb datadb server promptflow
docker compose -f docker-compose.yml -f docker-compose-dev.yml build recipedb
- name: Run the stack
run: |
export DATA_DB_CONN_STRING="postgresql://${POSTGRES_DATA_USER}:${POSTGRES_DATA_PASSWORD}@${POSTGRES_DATA_HOST}:${POSTGRES_DATA_PORT}/${POSTGRES_DATA_DB}"
export POSTGRES_RECIPE_CONN_STRING="postgresql://${POSTGRES_RECIPE_USER}:${POSTGRES_RECIPE_PASSWORD}@${POSTGRES_RECIPE_HOST}:${POSTGRES_RECIPE_PORT}/${POSTGRES_RECIPE_DB}"
env > .env
docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d recipedb datadb server promptflow
#docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d recipedb datadb server promptflow
docker compose -f docker-compose.yml -f docker-compose-dev.yml up recipedb
docker ps
- name: End to End tests using Promtpflow and chainlit code
Expand All @@ -98,7 +102,7 @@ jobs:
docker ps
echo "logs backend ..."
docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs server
echo "recipesdb backend ..."
echo "logs recipesdb ..."
docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs recipedb
echo "Tests ..."
docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run create --flow . --data ./data.jsonl --stream --column-mapping query='${data.query}' context='${data.context}' chat_history='${data.chat_history}' --name base_run
Expand Down

0 comments on commit 2248dd2

Please sign in to comment.