mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-30 06:45:10 +08:00
ci: Properly cache pip packages (#1912)
This commit is contained in:
parent
665318da3d
commit
b4a170cb8a
19
.github/workflows/api-model-runtime-tests.yml
vendored
19
.github/workflows/api-model-runtime-tests.yml
vendored
@ -31,28 +31,19 @@ jobs:
|
|||||||
HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL: c
|
HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL: c
|
||||||
MOCK_SWITCH: true
|
MOCK_SWITCH: true
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
cache: 'pip'
|
||||||
- name: Cache pip dependencies
|
cache-dependency-path: ./api/requirements.txt
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('api/requirements.txt') }}
|
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: pip install -r ./api/requirements.txt
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pytest
|
|
||||||
pip install -r api/requirements.txt
|
|
||||||
|
|
||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
run: 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
|
run: 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user