Files
GenAIExamples/.github/workflows/DocSum_xeon.yml
zehao-intel 2f36e57236 Refactor Document Summarization Example with Microservice (#151)
Signed-off-by: zehao-intel <zehao.huang@intel.com>
Co-authored-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: chensuyue <suyue.chen@intel.com>
2024-05-20 22:06:24 +08:00

58 lines
1.8 KiB
YAML

# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: DocSum E2E test on Xeon
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- DocSum/microservice/xeon/**
- DocSum/tests/test_docsum_on_xeon.sh
- "!**.md"
- "!**/ui/**"
- .github/workflows/DocSum_xeon.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:
DocSum-Xeon:
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 }}/DocSum/tests
timeout 20m bash test_docsum_on_xeon.sh
- name: Clean Up Container
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/DocSum/microservice/xeon
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 }}/DocSum/tests/*.log