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