Skip to content

Commit

Permalink
chore: add pre-commit ci
Browse files Browse the repository at this point in the history
To avoid creating too much of a burder on newer/one-off developers, the
pre-commit ci will run the checks, and where fixes can be done
automatically, the GitHub Action will automatically create a new commit
with the changes.

Signed-off-by: JP-Ellis <josh@jpellis.me>
  • Loading branch information
JP-Ellis committed Sep 15, 2023
1 parent e75470d commit 01ba089
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: pre-commit

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Run pre-commit
uses: pre-commit/action@v3.0.0

- name: Commit changes
uses: pre-commit-ci/lite-action@v1.0.1
if: always()

0 comments on commit 01ba089

Please sign in to comment.