add CI lint checks #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: Python Code Linting and Formatting | |
on: [push, pull_request] | |
jobs: | |
lint-format: | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.10-slim | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Ruff, Black, and isort | |
run: pip install ruff "black[jupyter]" isort | |
- name: Check imports order with isort | |
run: isort . --check-only | |
- name: Check Python code formatting with Black | |
run: black --check . | |
- name: Run Ruff linter | |
run: ruff . |