Skip to content

Commit

Permalink
Simplify online test
Browse files Browse the repository at this point in the history
  • Loading branch information
luandro committed Mar 25, 2024
1 parent 96ddf89 commit bf87893
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/offline-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ jobs:
run: docker ps -q | xargs -I {} docker logs --tail 10 {}
- name: Log RAG api
run: docker logs kakawa_rag_api --tail 100
- name: Free up disk space
run: |
sudo apt-get clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Pull Ollama model
run: |
OLLAMA_MODEL=$(grep OLLAMA_MODEL .env | cut -d '=' -f2)
echo "OLLAMA_MODEL: $OLLAMA_MODEL"
docker exec ollama ollama pull $OLLAMA_MODEL
- name: Test LangFuse API endpoint
run: |
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/online-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
test-offline-stack:
test-online-stack:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -33,31 +33,22 @@ jobs:
- name: Run docker-compose
run: docker-compose up -d
- name: Basic wait
run: sleep 120
run: sleep 100
- name: List running containers
run: docker ps
- name: Log last 10 lines from all containers
run: docker ps -q | xargs -I {} docker logs --tail 10 {}
- name: Log RAG api
run: docker logs kakawa_rag_api --tail 100
- name: Test LangFuse API endpoint
- name: Test Online LangFuse API endpoint
run: |
response=$(docker exec langfuse wget --header='accept: application/json' -qO - 'http:https://langfuse:3000/api/public/health')
response=$(docker exec langfuse wget --header='accept: application/json' -qO - "${{ secrets.LANGFUSE_HOST }}/api/public/health")
if echo "$response" | grep OK; then
echo "Health check OK"
else
echo "Health check failed"
exit 1
fi
- name: Test Qdrant API endpoint
run: |
response=$(docker exec kakawa_rag_api python -c "import requests; response = requests.get('http:https://qdrant:6333/healthz', headers={'accept': 'application/json'}); print(response.status_code)")
if [ "$response" -eq 200 ]; then
echo "Healthz check passed"
else
echo "Healthz check failed"
exit 1
fi
- name: Execute RAG API query
run: |
commit_hash=$(git rev-parse --short HEAD)
Expand Down

0 comments on commit bf87893

Please sign in to comment.