facelift #4
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: checks | |
on: | |
pull_request: | |
branches: ["master", "dev"] | |
push: | |
branches: ["master", "dev"] | |
jobs: | |
run_checks: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-python-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**.py | |
- name: Setup Python environment | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
uses: actions/setup-python@v3 | |
- name: Installs | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
run: | | |
python -m pip install black flake8 isort | |
- name: Run Python checks | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
run: | | |
flake8 ${{ steps.changed-python-files.outputs.all_changed_files }} --extend-ignore=E203,W503 --max-line-length=120 | |
black --check ${{ steps.changed-python-files.outputs.all_changed_files }} | |
isort --profile black ${{ steps.changed-python-files.outputs.all_changed_files }} |