-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4316f1d
commit bc7deb0
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This workflow will lint python and cython files using pylint and cython, respectively | ||
# adapted from https://github.com/actions/starter-workflows/blob/main/ci/pylint.yml | ||
# Linting can be configured in pyproject.toml | ||
|
||
name: Lint using pylint and cython-lint | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
pull_request: | ||
branches: ["main", "dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Set up Python 3.12" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
- name: Install linters | ||
- run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint cython-lint | ||
- name: Run lint | ||
- run: | | ||
pylint $(git ls-files '*.py') | ||
cython-lint $(git ls-files '*.pyx') |