Skip to content

Commit

Permalink
ci: add ruff, isort and mypy for code quality check
Browse files Browse the repository at this point in the history
  • Loading branch information
zyf722 committed Sep 4, 2024
1 parent f4a78bf commit 2e52a25
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Install code quality tools
run: pipx install ruff isort mypy

- name: Check for typos
uses: crate-ci/typos@master

- name: Lint code and check code formatting using ruff
run: |
ruff check --output-format=github .
ruff format --check .
- name: Type-check code using mypy
run: mypy --check-untyped-defs .

- name: Check import order using isort
run: isort -c --profile black .

build:
strategy:
matrix:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ execenv = "execenv:execenv"
"execenv-completion" = "execenv:execenv_completion"
"execenv-echo" = "execenv:execenv_echo"

[tool.ruff.lint]
ignore = ["E501"]

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 2e52a25

Please sign in to comment.