Merge pull request #113 from RSE-Sheffield/docs/install-instructions #18
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: Lint Python code | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
lint: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install linters | |
run: pip install black flake8 isort | |
- name: Lint Python code | |
run: | | |
dirs="SORT home survey" | |
isort $dirs --skip-glob '*/migrations/*' | |
black $dirs --exclude '/migrations/' | |
flake8 $dirs --exclude '*/migrations/*' | |
# Suggest merging any changes | |
- name: Create Pull Request | |
# https://github.com/marketplace/actions/create-pull-request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
body: "Python code reformatted with black and isort" | |
branch: "chore/python-formatting" |