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
|
2023-12-15 15:16:13 +00:00
|
|
|
- uses: actions/setup-python@v5
|
2022-10-20 09:55:24 +00:00
|
|
|
with:
|
2023-11-14 13:58:46 +00:00
|
|
|
python-version: '3.12'
|
2022-10-20 09:55:24 +00:00
|
|
|
cache: pip
|
2023-11-14 13:58:46 +00:00
|
|
|
- run: pip install -r 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
|