Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ jobs:
fi
done

run_test_cases="$run_test_cases test_ui.sh"
if [ -z "$run_test_cases" ] && [[ $(printf '%s\n' "${changed_files[@]}" | grep ${{ inputs.example }} | grep /tests/) ]]; then
run_test_cases=$other_test_cases
fi
Expand Down
33 changes: 0 additions & 33 deletions ChatQnA/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,35 +132,6 @@ function validate_megaservice() {

}

function validate_frontend() {
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi

source activate ${conda_env_name}

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
npm install && npm ci && npx playwright install --with-deps
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/intel/cpu/xeon
docker compose -f compose.yaml -f compose.telemetry.yaml down
Expand Down Expand Up @@ -188,10 +159,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
33 changes: 0 additions & 33 deletions ChatQnA/tests/test_compose_pinecone_on_epyc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,39 +176,6 @@ function validate_megaservice() {

}

function validate_frontend() {
echo "[ TEST INFO ]: --------- frontend test started ---------"
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
CONDA_ROOT=$(conda info --base)
source "${CONDA_ROOT}/etc/profile.d/conda.sh"
conda activate ${conda_env_name}
echo "[ TEST INFO ]: --------- conda env activated ---------"

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
# npm install && npm ci && npx playwright install --with-deps
npm install && npm ci && npx playwright install
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
echo "In stop docker"
echo $WORKPATH
Expand Down
30 changes: 0 additions & 30 deletions ChatQnA/tests/test_compose_pinecone_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,36 +174,6 @@ function validate_megaservice() {

}

function validate_frontend() {
echo "[ TEST INFO ]: --------- frontend test started ---------"
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
source activate ${conda_env_name}
echo "[ TEST INFO ]: --------- conda env activated ---------"

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
npm install && npm ci && npx playwright install --with-deps
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
echo "In stop docker"
echo $WORKPATH
Expand Down
34 changes: 0 additions & 34 deletions ChatQnA/tests/test_compose_qdrant_on_epyc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,36 +167,6 @@ function validate_megaservice() {

}

function validate_frontend() {
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
CONDA_ROOT=$(conda info --base)
source "${CONDA_ROOT}/etc/profile.d/conda.sh"
conda activate ${conda_env_name}

sed -i "s/localhost/$ip_address/g" playwright.config.ts

# npm install && npm ci && npx playwright install --with-deps
npm install && npm ci && npx playwright install
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/amd/cpu/epyc
docker compose -f compose_qdrant.yaml down
Expand Down Expand Up @@ -224,10 +194,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
31 changes: 0 additions & 31 deletions ChatQnA/tests/test_compose_qdrant_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,33 +159,6 @@ function validate_megaservice() {

}

function validate_frontend() {
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
source activate ${conda_env_name}

sed -i "s/localhost/$ip_address/g" playwright.config.ts

npm install && npm ci && npx playwright install --with-deps
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/intel/cpu/xeon
docker compose -f compose_qdrant.yaml down
Expand Down Expand Up @@ -213,10 +186,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
37 changes: 0 additions & 37 deletions ChatQnA/tests/test_compose_tgi_on_epyc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,39 +178,6 @@ function validate_megaservice() {

}

function validate_frontend() {
echo "[ TEST INFO ]: --------- frontend test started ---------"
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
CONDA_ROOT=$(conda info --base)
source "${CONDA_ROOT}/etc/profile.d/conda.sh"
conda activate ${conda_env_name}
echo "[ TEST INFO ]: --------- conda env activated ---------"

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
# npm install && npm ci && npx playwright install --with-deps
npm install && npm ci && npx playwright install
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/amd/cpu/epyc
docker compose -f compose_tgi.yaml -f compose_tgi.telemetry.yaml down
Expand Down Expand Up @@ -238,10 +205,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
34 changes: 0 additions & 34 deletions ChatQnA/tests/test_compose_tgi_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,36 +172,6 @@ function validate_megaservice() {

}

function validate_frontend() {
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
source activate ${conda_env_name}

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
npm install && npm ci && npx playwright install --with-deps
node -v && npm -v && pip list

export no_proxy="localhost,127.0.0.1,$ip_address"

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/intel/hpu/gaudi
docker compose -f compose_tgi.yaml -f compose_tgi.telemetry.yaml down
Expand Down Expand Up @@ -229,10 +199,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
34 changes: 0 additions & 34 deletions ChatQnA/tests/test_compose_tgi_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,36 +170,6 @@ function validate_megaservice() {

}

function validate_frontend() {
echo "[ TEST INFO ]: --------- frontend test started ---------"
cd $WORKPATH/ui/svelte
local conda_env_name="OPEA_e2e"
export PATH=${HOME}/miniforge3/bin/:$PATH
if conda info --envs | grep -q "$conda_env_name"; then
echo "$conda_env_name exist!"
else
conda create -n ${conda_env_name} python=3.12 -y
fi
source activate ${conda_env_name}
echo "[ TEST INFO ]: --------- conda env activated ---------"

sed -i "s/localhost/$ip_address/g" playwright.config.ts

conda install -c conda-forge nodejs=22.6.0 -y
npm install && npm ci && npx playwright install --with-deps
node -v && npm -v && pip list

exit_status=0
npx playwright test || exit_status=$?

if [ $exit_status -ne 0 ]; then
echo "[TEST INFO]: ---------frontend test failed---------"
exit $exit_status
else
echo "[TEST INFO]: ---------frontend test passed---------"
fi
}

function stop_docker() {
cd $WORKPATH/docker_compose/intel/cpu/xeon
docker compose -f compose_tgi.yaml -f compose_tgi.telemetry.yaml down
Expand Down Expand Up @@ -227,10 +197,6 @@ function main() {
validate_megaservice
echo "::endgroup::"

echo "::group::validate_frontend"
validate_frontend
echo "::endgroup::"

echo "::group::stop_docker"
stop_docker
echo "::endgroup::"
Expand Down
Loading
Loading