Skip to content

Commit

Permalink
Added pre-commit workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
elongl committed Jul 9, 2023
1 parent a648ae6 commit a4c8c4a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/run-precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run pre-commit hooks
on:
push:
paths:
- '**.py'
workflow_dispatch:

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout Elementary
uses: actions/checkout@v3

- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.8'

- name: Install dev requirements
run: pip install -r dev-requirements.txt

- name: Run pre-commit hooks
run: pre-commit run --all-files --show-diff-on-failure
2 changes: 2 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pre-commit

0 comments on commit a4c8c4a

Please sign in to comment.