Added a pre-commit-config file #16
Workflow file for this run
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 Linting CI | |
on: | |
push: | |
branches: [ $default-branch ] | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
#Checkout Code | |
- uses: actions/checkout@v4 | |
#Set up Python | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
#Install dependencies | |
- name: Install dependencies | |
run: pip install .[lint] | |
#Check code formatting with ruff | |
# annotate each step with `if: always` to run all regardless | |
- name: Check code formatting with ruff | |
if: always() | |
run: ruff format --diff newCAM_emulation/ | |
#Lint with ruff using pyproject.toml configuration | |
- name: Lint with ruff using pyproject.toml configuration | |
if: always() | |
run: ruff check newCAM_emulation/ | |