Skip to content

Commit

Permalink
Added e2e tests GH action, with docker compose build - debugging action
Browse files Browse the repository at this point in the history
  • Loading branch information
dividor committed Jul 1, 2024
1 parent 593804a commit 7aa2e70
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2


# - name: Build images
# run: |
# env > .env
Expand All @@ -79,7 +80,7 @@ jobs:
# cat metadata.json
# docker images

- name: Spin up services
- name: Spin up DB and recipes server
run: |
env > .env
Expand All @@ -90,24 +91,21 @@ jobs:
echo "logs datadb ..."
docker-compose -f docker-compose-github.yml logs datadb
- name: End to End tests using Promtpflow and chainlit code
run: |
set -e
docker ps
echo "logs backend ..."
docker-compose -f docker-compose-github.yml logs server
echo "logs datadb ..."
docker-compose -f docker-compose-github.yml logs datadb
echo "logs recipesdb ..."
docker-compose -f docker-compose-github.yml logs recipedb
echo "logs promptflow ..."
docker-compose -f docker-compose-github.yml logs promptflow
echo "Tests ..."
docker compose -f docker-compose-github.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-github.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-details -n base_run
docker compose -f docker-compose-github.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run show-metrics -n base_run
#docker compose -f docker-compose-github.yml exec --workdir /app/chainlit-ui-evaluation promptflow pf run visualize -n base_run
docker compose -f docker-compose-github.yml exec --workdir /app/chainlit-ui-evaluation promptflow python3 check_evaluation_results.py
docker-compose -f docker-compose-github.yml down -v --remove-orphans
- name: Set up promtpflow and run tests
uses: actions/setup-python@v4
with:
python-version: "3.11.4"
- run: |
pip3 install promptflow==1.12.0
pip3 install chainlit==1.1.305
pip3 install keyrings.alt
- run: |
pip3 install promptflow==1.12.0
pip3 install chainlit==1.1.305
pip3 install keyrings.alt
pf run create --flow . --data ./data.jsonl --stream --column-mapping query='${data.query}' context='${data.context}' chat_history='${data.chat_history}' --name base_run
pf run show-details -n base_run
pf run show-metrics -n base_run
#pf run visualize -n base_run
python3 check_evaluation_results.py
34 changes: 17 additions & 17 deletions docker-compose-github.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
services:
promptflow:
build:
context: .
dockerfile: ./flows/chainlit-ui-evaluation/Dockerfile
args:
OPENAI_API_KEY: ${OPENAI_API_KEY}
OPENAI_API_ENDPOINT: ${ASSISTANTS_BASE_URL}
container_name: recipes-ai-promptflow
env_file:
- .env
volumes:
- ./flows:/app
- ./utils:/app/chainlit-ui-evaluation/utils
- ./templates:/app/chainlit-ui-evaluation/templates
- shared-data:/app/chainlit-ui-evaluation/recipes/public
- ./management/skills.py:/app/chainlit-ui-evaluation/recipes/skills.py
- ./ui/chat-chainlit-assistant/app.py:/app/chainlit-ui-evaluation/app.py
# promptflow:
# build:
# context: .
# dockerfile: ./flows/chainlit-ui-evaluation/Dockerfile
# args:
# OPENAI_API_KEY: ${OPENAI_API_KEY}
# OPENAI_API_ENDPOINT: ${ASSISTANTS_BASE_URL}
# container_name: recipes-ai-promptflow
# env_file:
# - .env
# volumes:
# - ./flows:/app
# - ./utils:/app/chainlit-ui-evaluation/utils
# - ./templates:/app/chainlit-ui-evaluation/templates
# - shared-data:/app/chainlit-ui-evaluation/recipes/public
# - ./management/skills.py:/app/chainlit-ui-evaluation/recipes/skills.py
# - ./ui/chat-chainlit-assistant/app.py:/app/chainlit-ui-evaluation/app.py

datadb:
platform: linux/amd64
Expand Down

0 comments on commit 7aa2e70

Please sign in to comment.