test: add scripts for running tests on api module both locally and CI jobs (#3497)

This commit is contained in:
Bowen Liang
2024-04-18 13:43:15 +08:00
committed by GitHub
parent ed861ff782
commit d463b82aba
8 changed files with 66 additions and 5 deletions

11
dev/pytest/pytest_all_tests.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -x
# ModelRuntime
dev/pytest/pytest_model_runtime.sh
# Tools
dev/pytest/pytest_tools.sh
# Workflow
dev/pytest/pytest_workflow.sh

View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -x
pytest api/tests/integration_tests/model_runtime/anthropic \
api/tests/integration_tests/model_runtime/azure_openai \
api/tests/integration_tests/model_runtime/openai api/tests/integration_tests/model_runtime/chatglm \
api/tests/integration_tests/model_runtime/google api/tests/integration_tests/model_runtime/xinference \
api/tests/integration_tests/model_runtime/huggingface_hub/test_llm.py

4
dev/pytest/pytest_tools.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -x
pytest api/tests/integration_tests/tools/test_all_provider.py

4
dev/pytest/pytest_workflow.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -x
pytest api/tests/integration_tests/workflow