Skip to content

Commit

Permalink
add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lrauschning committed Dec 6, 2024
1 parent 4316f1d commit bc7deb0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
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')

0 comments on commit bc7deb0

Please sign in to comment.