Skip to content

GH action lint: check with darker iso black #57

GH action lint: check with darker iso black

GH action lint: check with darker iso black #57

Workflow file for this run

name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: "Lint: code quality and formatting checks"
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install isort ruff 'darker==1.7.2'
- name: isort
run: python -m isort . --check --diff
- name: ruff
run: ruff check .
- name: darker
# For now, run "darker" (iso "black")
# to only check formatting of edited/new code
# TODO: consider using the official action `uses: akaihola/darker@...`
# as documented on https://github.com/akaihola/darker/blob/master/README.rst
run: python -m darker --check --diff -r 'master...' .