2022-10-20 13:30:44 +00:00
|
|
|
name: "Lint: Python Coordinator"
|
2022-10-20 09:55:24 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-20 13:19:20 +00:00
|
|
|
paths:
|
|
|
|
- '**.py'
|
|
|
|
pull_request_target:
|
2022-10-20 09:55:24 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- '**.py'
|
|
|
|
|
2022-10-20 13:19:20 +00:00
|
|
|
permissions:
|
|
|
|
checks: write
|
|
|
|
|
2022-10-20 09:55:24 +00:00
|
|
|
jobs:
|
|
|
|
run-linters:
|
|
|
|
name: Run linters
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-11 16:00:32 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-10-20 09:55:24 +00:00
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
2023-10-23 22:48:38 +00:00
|
|
|
python-version: '3.11.6'
|
2022-10-20 09:55:24 +00:00
|
|
|
cache: pip
|
2023-11-13 14:40:47 +00:00
|
|
|
- run: pip install requirements_dev.txt
|
2022-10-20 09:55:24 +00:00
|
|
|
- name: Run linters
|
|
|
|
uses: wearerequired/lint-action@v2
|
|
|
|
with:
|
|
|
|
auto_fix: true
|
2022-10-20 13:19:20 +00:00
|
|
|
git_name: "Python Lint Action"
|
|
|
|
commit_message: "Fix code style issues with ${linter}"
|
|
|
|
commit: false
|
|
|
|
neutral_check_on_warning: true
|
2022-10-20 09:55:24 +00:00
|
|
|
black: true
|
|
|
|
flake8: true
|
|
|
|
# Flake8 doesn't support auto-fixing
|
|
|
|
flake8_auto_fix: false
|