From 9968dfba62f4c9fe6e0250acebb67f9175900da4 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 13 Aug 2024 12:06:35 +0800 Subject: [PATCH 1/5] adapt GenAIExample test refine Signed-off-by: chensuyue --- .github/workflows/pr-examples-test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-examples-test.yml b/.github/workflows/pr-examples-test.yml index 92354c5c2..7f8b1b9c8 100644 --- a/.github/workflows/pr-examples-test.yml +++ b/.github/workflows/pr-examples-test.yml @@ -42,20 +42,15 @@ jobs: HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} run: | 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 ${{ github.workspace }}/GenAIExamples/ChatQnA/docker + cp -r ${{ github.workspace }}/../GenAIComps . cd ${{ github.workspace }}/GenAIExamples/ChatQnA/tests - GenAIComps_dir=${{github.workspace}} 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..." - timeout 50m bash test_chatqna_on_gaudi.sh + timeout 50m IMAGE_TAG="comps" bash test_chatqna_on_gaudi.sh - name: Clean up container if: cancelled() || failure() From b584fe3fed1d7775d204f37523a802bd9efac5b5 Mon Sep 17 00:00:00 2001 From: chensuyue Date: Fri, 16 Aug 2024 17:50:51 +0800 Subject: [PATCH 2/5] for test Signed-off-by: chensuyue --- .github/workflows/pr-examples-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-examples-test.yml b/.github/workflows/pr-examples-test.yml index 7f8b1b9c8..2141fb05d 100644 --- a/.github/workflows/pr-examples-test.yml +++ b/.github/workflows/pr-examples-test.yml @@ -4,7 +4,7 @@ name: Example-test on: - pull_request_target: + pull_request: branches: [main] types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: From 86b3b28425cba2f2f773948962954f852e9858c7 Mon Sep 17 00:00:00 2001 From: chensuyue Date: Fri, 16 Aug 2024 18:02:58 +0800 Subject: [PATCH 3/5] bug fix Signed-off-by: chensuyue --- .github/workflows/pr-examples-test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-examples-test.yml b/.github/workflows/pr-examples-test.yml index 2141fb05d..db44ddabb 100644 --- a/.github/workflows/pr-examples-test.yml +++ b/.github/workflows/pr-examples-test.yml @@ -41,21 +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 + cd GenAIExamples/ChatQnA/docker cp -r ${{ github.workspace }}/../GenAIComps . - cd ${{ github.workspace }}/GenAIExamples/ChatQnA/tests + cd ../tests sed -i '/GenAIComps.git/d' test_chatqna_on_gaudi.sh cat test_chatqna_on_gaudi.sh echo "Run test..." - timeout 50m IMAGE_TAG="comps" bash test_chatqna_on_gaudi.sh + 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 @@ -64,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 }} From 4ceb89ff47a4817fd12f727e5afbd3b41523d85c Mon Sep 17 00:00:00 2001 From: chensuyue Date: Fri, 16 Aug 2024 19:57:05 +0800 Subject: [PATCH 4/5] set back pull_request_target Signed-off-by: chensuyue --- .github/workflows/pr-examples-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-examples-test.yml b/.github/workflows/pr-examples-test.yml index db44ddabb..337d3c504 100644 --- a/.github/workflows/pr-examples-test.yml +++ b/.github/workflows/pr-examples-test.yml @@ -4,7 +4,7 @@ name: Example-test on: - pull_request: + pull_request_target: branches: [main] types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: From 3b376b6f0114449dfbd7d873f84c12ff48d6b291 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:58:16 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/pr-examples-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-examples-test.yml b/.github/workflows/pr-examples-test.yml index 337d3c504..a1f41f9f6 100644 --- a/.github/workflows/pr-examples-test.yml +++ b/.github/workflows/pr-examples-test.yml @@ -53,7 +53,7 @@ jobs: 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