Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt GenAIExample test structure refine #510

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/pr-examples-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,25 @@ jobs:
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
run: |
cd ../ && rm -rf GenAIExamples
git clone https://github.com/opea-project/GenAIExamples.git
cd ${{ github.workspace }}/GenAIExamples/ChatQnA/docker/gaudi
sed -i "s#:latest#:comps#g" compose.yaml
cat compose.yaml
cd GenAIExamples/ChatQnA/docker
cp -r ${{ github.workspace }}/../GenAIComps .

cd ${{ github.workspace }}/GenAIExamples/ChatQnA/tests
GenAIComps_dir=${{github.workspace}}
cd ../tests
sed -i '/GenAIComps.git/d' test_chatqna_on_gaudi.sh
sed -i "s#cd GenAIComps#cd ${GenAIComps_dir}#g" test_chatqna_on_gaudi.sh
sed -i "s#docker build -t#docker build --no-cache -q -t#g" test_chatqna_on_gaudi.sh
sed -i "s#:latest#:comps#g" test_chatqna_on_gaudi.sh
cat test_chatqna_on_gaudi.sh

echo "Run test..."
export IMAGE_TAG="comps"
timeout 50m bash test_chatqna_on_gaudi.sh

echo "LOG_PATH=$(pwd)/*.log" >> $GITHUB_ENV

- name: Clean up container
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/GenAIExamples/ChatQnA/docker/gaudi
cd ${{ github.workspace }}/../GenAIExamples/ChatQnA/docker/gaudi
docker compose stop && docker compose rm -f
docker system prune -f

Expand All @@ -69,4 +68,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: "Examples-Test-Logs"
path: ${{ github.workspace }}/GenAIExamples/ChatQnA/tests/*.log
path: ${{ env.LOG_PATH }}
Loading