Skip to content

Commit 0b1259f

Browse files
chore: add script for running mypy type checks and speed up mypy checks in CI jobs (langgenius#17489)
1 parent eb0e51d commit 0b1259f

File tree

5 files changed

+391
-120
lines changed

5 files changed

+391
-120
lines changed

.github/workflows/api-tests.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ jobs:
5353
- name: Run dify config tests
5454
run: poetry run -P api python dev/pytest/pytest_config_tests.py
5555

56+
- name: Cache MyPy
57+
uses: actions/cache@v4
58+
with:
59+
path: api/.mypy_cache
60+
key: mypy-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('api/poetry.lock') }}
61+
5662
- name: Run mypy
57-
run: |
58-
poetry run -C api python -m mypy --install-types --non-interactive .
63+
run: dev/run-mypy
5964

6065
- name: Set up dotenvs
6166
run: |

0 commit comments

Comments
 (0)