Skip to content

Commit

Permalink
Create lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNeodev authored Dec 18, 2024
1 parent 95ebacf commit e9b7bbb
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint and Auto-Fix

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

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: |
pip install black flake8
- name: Run Black to format code
run: black .
continue-on-error: true

- name: Run Flake8 to lint code
run: flake8 .
continue-on-error: true

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Auto-format code with Black'
branch: ${{ github.ref }}
file_pattern: '**/*.py'

0 comments on commit e9b7bbb

Please sign in to comment.