fix: update github action

This commit is contained in:
Bo Liu 2024-04-16 14:21:46 +08:00
parent 9bb02cc50d
commit 37fcec4806
2 changed files with 6 additions and 16 deletions

View File

@ -39,7 +39,7 @@ jobs:
run: | run: |
python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade pip setuptools wheel
- name: Install TorchOpt - name: Install DeepSeek-VL
env: env:
USE_FP16: "OFF" USE_FP16: "OFF"
TORCH_CUDA_ARCH_LIST: "Auto" TORCH_CUDA_ARCH_LIST: "Auto"
@ -47,21 +47,9 @@ jobs:
python -m pip install torch numpy pybind11 python -m pip install torch numpy pybind11
python -m pip install -vvv --no-build-isolation --editable '.[lint]' python -m pip install -vvv --no-build-isolation --editable '.[lint]'
- name: pre-commit - name: black
run: | run: |
make pre-commit make black-format
- name: ruff
run: |
make ruff
- name: flake8
run: |
make flake8
- name: isort and black
run: |
make py-format
- name: addlicense - name: addlicense
run: | run: |

View File

@ -66,6 +66,9 @@ py-format: py-format-install
$(PYTHON) -m isort --project $(PROJECT_PATH) --check $(PYTHON_FILES) && \ $(PYTHON) -m isort --project $(PROJECT_PATH) --check $(PYTHON_FILES) && \
$(PYTHON) -m black --check $(PYTHON_FILES) $(PYTHON) -m black --check $(PYTHON_FILES)
black-format: py-format-install
$(PYTHON) -m black --check $(PYTHON_FILES)
ruff: ruff-install ruff: ruff-install
$(PYTHON) -m ruff check . $(PYTHON) -m ruff check .
@ -85,7 +88,6 @@ lint: ruff flake8 py-format mypy pylint addlicense
format: py-format-install ruff-install addlicense-install format: py-format-install ruff-install addlicense-install
$(PYTHON) -m isort --project $(PROJECT_PATH) $(PYTHON_FILES) $(PYTHON) -m isort --project $(PROJECT_PATH) $(PYTHON_FILES)
$(PYTHON) -m black $(PYTHON_FILES) $(PYTHON) -m black $(PYTHON_FILES)
$(PYTHON) -m ruff check . --fix --exit-zero
addlicense -c $(COPYRIGHT) -ignore tests/coverage.xml -l mit -y 2023-$(shell date +"%Y") $(SOURCE_FOLDERS) cli_chat.py inference.py addlicense -c $(COPYRIGHT) -ignore tests/coverage.xml -l mit -y 2023-$(shell date +"%Y") $(SOURCE_FOLDERS) cli_chat.py inference.py
clean-py: clean-py: