1717 test :
1818 name : API Tests
1919 runs-on : ubuntu-latest
20+ defaults :
21+ run :
22+ shell : bash
2023 strategy :
2124 matrix :
2225 python-version :
@@ -30,37 +33,32 @@ jobs:
3033 fetch-depth : 0
3134 persist-credentials : false
3235
33- - name : Setup Poetry and Python ${{ matrix.python-version }}
34- uses : ./.github/actions/setup-poetry
36+ - name : Setup UV and Python
37+ uses : ./.github/actions/setup-uv
3538 with :
3639 python-version : ${{ matrix.python-version }}
37- poetry -lockfile : api/poetry .lock
40+ uv -lockfile : api/uv .lock
3841
39- - name : Check Poetry lockfile
40- run : |
41- poetry check -C api --lock
42- poetry show -C api
42+ - name : Check UV lockfile
43+ run : uv lock --project api --check
4344
4445 - name : Install dependencies
45- run : poetry install -C api --with dev
46-
47- - name : Check dependencies in pyproject.toml
48- run : poetry run -P api bash dev/pytest/pytest_artifacts.sh
46+ run : uv sync --project api --group dev
4947
5048 - name : Run Unit tests
51- run : poetry run -P api bash dev/pytest/pytest_unit_tests.sh
49+ run : uv run --project api bash dev/pytest/pytest_unit_tests.sh
5250
5351 - name : Run dify config tests
54- run : poetry run -P api python dev/pytest/pytest_config_tests.py
52+ run : uv run --project api dev/pytest/pytest_config_tests.py
5553
56- - name : Cache MyPy
54+ - name : MyPy Cache
5755 uses : actions/cache@v4
5856 with :
5957 path : api/.mypy_cache
60- key : mypy-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('api/poetry .lock') }}
58+ key : mypy-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('api/uv .lock') }}
6159
62- - name : Run mypy
63- run : dev/run- mypy
60+ - name : Run MyPy Checks
61+ run : dev/mypy-check
6462
6563 - name : Set up dotenvs
6664 run : |
8078 ssrf_proxy
8179
8280 - name : Run Workflow
83- run : poetry run -P api bash dev/pytest/pytest_workflow.sh
81+ run : uv run --project api bash dev/pytest/pytest_workflow.sh
0 commit comments