Skip to content

Commit

Permalink
ci: config pre-commit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gosuto-inzasheru committed Apr 2, 2024
1 parent 9125eec commit af830cf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

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

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Pre-commit
uses: pre-commit/[email protected]
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
- id: pretty-format-json
args:
- "--autofix"
- "--indent=2"
- "--no-sort-keys"
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
1 change: 1 addition & 0 deletions bal_addresses/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pytest-mock
responses
pytest-cov
pytest==7.4.0
pre-commit

0 comments on commit af830cf

Please sign in to comment.