-
Notifications
You must be signed in to change notification settings - Fork 145
68 lines (58 loc) · 2.15 KB
/
pr-examples-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Example-test
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- .github/workflows/pr-examples-test.yml
- comps/cores/**
- comps/dataprep/src/redis/langchain/**
- comps/retrievers/src/redis/langchain/**
- requirements.txt
- "!**.md"
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
example-test:
runs-on: gaudi-01-3
steps:
- name: Clean Up Working Directory
run: |
sudo rm -rf ${{github.workspace}}/* || true
echo y | docker system prune
docker rmi $(docker images --filter reference="*/*:comps" -q) || true
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Run ChatQnA
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
run: |
cd ../ && sudo rm -rf GenAIExamples
git clone https://github.com/opea-project/GenAIExamples.git
cd GenAIExamples/ChatQnA/docker_image_build
cp -r ${{ github.workspace }}/../GenAIComps .
cd ../tests
sed -i '/GenAIComps.git/d' test_compose_on_gaudi.sh
cat test_compose_on_gaudi.sh
echo "Run test..."
echo "LOG_DIR=$(pwd)" >> $GITHUB_ENV
export IMAGE_TAG="comps"
timeout 50m bash test_compose_on_gaudi.sh
- name: Clean up container
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/../GenAIExamples/ChatQnA/docker_compose/intel/hpu/gaudi
docker compose stop && docker compose rm -f
docker system prune -f
- name: Publish pipeline artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: "Examples-Test-Logs"
path: ${{ env.LOG_DIR }}/*.log