Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com> Signed-off-by: chensuyue <suyue.chen@intel.com>
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: ChatQnA E2E test on Gaudi
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches: [main]
|
|
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
paths:
|
|
- ChatQnA/docker-composer/gaudi/**
|
|
- ChatQnA/tests/test_chatqna_on_gaudi.sh
|
|
- "!**.md"
|
|
- "!**/ui/**"
|
|
- .github/workflows/ChatQnA_gaudi.yml
|
|
workflow_dispatch:
|
|
|
|
# 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:
|
|
ChatQnA-Gaudi:
|
|
runs-on: aise-cluster
|
|
steps:
|
|
- name: Clean Up Working Directory
|
|
run: sudo rm -rf ${{github.workspace}}/*
|
|
|
|
- name: Checkout out Repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
|
|
- name: Run Test
|
|
env:
|
|
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
run: |
|
|
cd ${{ github.workspace }}/ChatQnA/tests
|
|
timeout 20m bash test_chatqna_on_gaudi.sh
|
|
|
|
- name: Clean Up Container
|
|
if: cancelled() || failure()
|
|
run: |
|
|
cd ${{ github.workspace }}/ChatQnA/docker-composer/gaudi
|
|
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
for container_name in $container_list; do
|
|
cid=$(docker ps -aq --filter "name=$container_name")
|
|
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
done
|
|
|
|
- name: Publish pipeline artifact
|
|
if: ${{ !cancelled() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: ${{ github.workspace }}/ChatQnA/tests/*.log
|