Skip to content

Commit

Permalink
Add workflow for code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
msosav committed Jan 11, 2025
1 parent 963fece commit ae1308b
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Formatter

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Black formatter
run: |
black .
- name: Isort formatter
run: |
isort .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix formatting
skip_fetch: true
branch: ${{ github.head_ref }}

0 comments on commit ae1308b

Please sign in to comment.