Skip to content

Commit

Permalink
Add pre-commit ci hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedawnallah committed Dec 27, 2023
1 parent 63acd5b commit 925c3af
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/format-and-lint.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pre-commit CI

on: [push, pull_request]

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

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

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

# This will configure the pre-commit hooks in
# '.pre-commit-config.yaml' file.
- name: Configure pre-commit
run: pre-commit install

- name: Run pre-commit hooks
run: pre-commit run --all-files

0 comments on commit 925c3af

Please sign in to comment.