mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
34 lines
727 B
YAML
34 lines
727 B
YAML
name: Python formatting with Black and Ruff
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
format:
|
|
name: Formatting with Black and Ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check files using the black formatter
|
|
uses: psf/black@stable
|
|
id: black
|
|
with:
|
|
options: "."
|
|
continue-on-error: true
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.9"
|
|
- name: Install Ruff
|
|
run: pip install ruff
|
|
|
|
- name: Ruff check and fix
|
|
run: |
|
|
ruff check .
|
|
ruff check --fix .
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: 'Python formatting fixes from Black and Ruff'
|