Skip to content

Create pylint.yml

Create pylint.yml #8

Workflow file for this run

name: Pylint
on:
pull_request:
paths-ignore:
- "*.md"
- "**/*.md"
- "LICENSE*"
concurrency:
group: sd-lint-py-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- run: cat examples/requirements.txt | sed 's/cu118/cpu/g' > requirements-dev.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "**/requirements-dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') \
--ignore_patterns=.*src/onediff/schedulers.* \
--ignore_patterns=.*src/infer_compiler_registry.*