linting workflow added to check python code #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pylint | |
on: | |
pull_request: | |
branches: | |
- trunk | |
push: | |
branches: | |
- trunk | |
defaults: | |
run: | |
shell: bash | |
env: | |
BUILD_DIR: x86_64 | |
jobs: | |
pylint: | |
name: Pylint | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements_py.txt ]; then pip install -r requirements_py.txt; fi | |
pip install pylint | |
- name: Lint with Pylint | |
run: | | |
# In the future we should have (minimum score of 8.0/10.0 or 9.0/10.0) | |
pylint --rcfile=.pylintrc $(git ls-files '*.py') --fail-under=5.0 |