add test workflow #23
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
# 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: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
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 'msyd/*.py') | |
cython-lint --no-pycodestyle $(git ls-files '*.pyx') |