Skip to content

Commit

Permalink
update pylint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
qidanrui committed Dec 25, 2023
1 parent 75a361e commit 7d2cd2e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,41 @@ concurrency:

jobs:
build:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
name: ${{ matrix.os }} x py${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
install_graphviz:
sudo apt install graphviz graphviz-dev
- os: macos-latest
install_graphviz: brew install graphviz
- os: windows-latest
install_graphviz:
choco install graphviz --version=2.48.0;
python -m pip install --upgrade pip;
pip install --global-option=build_ext --global-option="-IC:\Program Files\Graphviz\include" --global-option="-LC:\Program Files\Graphviz\lib" pygraphviz;
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U black isort pylint
- name: Print tool versions
run: |
black --version
pylint --version
- name: Check if the code is formatted
run: |
black . --check
- name: Style check the project
run: |
pylint dbgpt || true
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U black isort pylint
- name: Print tool versions
run: |
black --version
pylint --version
- name: Check if the code is formatted
run: |
black . --check
- name: Style check the project
run: |
pylint dbgpt || true
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ fmt: setup ## Format Python code
# TODO: Use blackdoc to format Python doctests.
# https://blackdoc.readthedocs.io/en/latest/
# $(VENV_BIN)/blackdoc .
# TODO: style checking of Python code.
# https://github.com/pylint-dev/pylint
# $(VENV_BIN)/pylint dbgpt
# TODO: Type checking of Python code.
# https://github.com/python/mypy
# $(VENV_BIN)/mypy dbgpt
Expand Down
1 change: 1 addition & 0 deletions requirements/lint-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ flake8-simplify==0.19.3
flake8-tidy-imports==4.8.0
isort==5.10.1
pyupgrade==3.1.0
pylint==3.0.3

0 comments on commit 7d2cd2e

Please sign in to comment.