Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/_comps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
description: "Whether the test range is CI, CD or CICD"
required: false
type: string
use_model_cache:
default: false
description: "use model cache true or false"
required: false
type: boolean

jobs:
####################################################################################################
Expand Down Expand Up @@ -111,6 +116,7 @@ jobs:
with:
tag: ${{ inputs.tag }}
service: ${{ inputs.service }}
use_model_cache: ${{ inputs.use_model_cache }}
secrets: inherit

####################################################################################################
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
description: Example to test
required: true
type: string
use_model_cache:
default: false
required: false
type: boolean

jobs:
get-test-case:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -96,10 +101,19 @@ jobs:
service: ${{ inputs.service }}
test_case: ${{ matrix.test_case }}
hardware: ${{ matrix.hardware }}
use_model_cache: ${{ inputs.use_model_cache }}
run: |
cd ${{ github.workspace }}/tests
service=$(echo "${test_case}" | cut -d'/' -f3 | cut -d'_' -f2- |cut -d'.' -f1)
echo "service=${service}" >> $GITHUB_ENV
if [[ "$use_model_cache" == "true" ]]; then
if [ -d "/data2/hf_model" ]; then
export model_cache="/data2/hf_model"
else
echo "Model cache directory /data2/huggingface does not exist"
export model_cache="~/.cache/huggingface/hub"
fi
fi
if [ -f ${test_case} ]; then timeout 60m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi

- name: Clean up container
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/manual-comps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ on:
description: "Whether the test range is CI, CD or CICD"
required: false
type: string
use_model_cache:
default: false
description: "use model cache true or false"
required: false
type: boolean

permissions: read-all

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-microservice-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
run: |
cd tests
echo "log_name=${service}" >> $GITHUB_ENV
if [ -d "/data2/hf_model" ]; then
export model_cache="/data2/hf_model"
else
echo "Model cache directory /data2/huggingface does not exist"
export model_cache="~/.cache/huggingface/hub"
fi
timeout 60m bash $(find . -type f -name test_${service}.sh)

- name: Clean up container
Expand Down
4 changes: 2 additions & 2 deletions tests/text2sql/test_text2sql.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -7,7 +7,7 @@ set -x
WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')
DATA_PATH=$WORKPATH/data
export DATA_PATH=${model_cache:-./data}

export TAG='comps'

Expand Down
4 changes: 2 additions & 2 deletions tests/text2sql/test_text2sql_on_intel_hpu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -8,7 +8,7 @@ WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')

export DATA_PATH=$WORKPATH/data
export DATA_PATH=${model_cache:-./data}

export TAG='comps'

Expand Down