Skip to content

Commit

Permalink
Feature: Add ruff formatting action when pushing to main or merging P…
Browse files Browse the repository at this point in the history
…R to main
  • Loading branch information
ABDreos committed Mar 20, 2024
1 parent 580b73c commit 65b70f6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python Linting and formatting with Ruff

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- run: |
ruff format
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Code formatted with Ruff'

0 comments on commit 65b70f6

Please sign in to comment.