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 07702fb commit 077e69e
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,34 +93,36 @@ jobs:
#docker compose -f docker-compose.yml -f docker-compose-dev.yml build recipedb datadb server promptflow
docker buildx create --use
docker buildx bake -f ./docker-compose.yml datadb
docker-compose -f docker-compose.yml up datadb
echo "DDDDDDDDD"
echo "logs datadb ..."
docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs datadb
- 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 ps
- name: End to End tests using Promtpflow and chainlit code
run: |
set -e
docker ps
echo "logs backend ..."
docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs server
echo "logs datadb ..."
docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs datadb
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
docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-details -n base_run
docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-metrics -n base_run
#docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run visualize -n base_run
docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow python3 check_evaluation_results.py
docker-compose -f docker-stack.yml -f docker-compose-dev.yml down -v --remove-orphans
docker-compose -f docker-compose.yml logs datadb
# - 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 ps

# - name: End to End tests using Promtpflow and chainlit code
# run: |
# set -e
# docker ps
# echo "logs backend ..."
# docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs server
# echo "logs datadb ..."
# docker-compose -f docker-compose.yml -f docker-compose-dev.yml logs datadb
# 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
# docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-details -n base_run
# docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-metrics -n base_run
# #docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run visualize -n base_run
# docker compose -f docker-compose.yml -f docker-compose-dev.yml exec --workdir /app/chainlit-ui-evaluation promptflow python3 check_evaluation_results.py
# docker-compose -f docker-stack.yml -f docker-compose-dev.yml down -v --remove-orphans

0 comments on commit 077e69e

Please sign in to comment.