Skip to content

Commit

Permalink
Try adding a pre-commit hook for pip-compile
Browse files Browse the repository at this point in the history
Compile all the requirements files at the pre-merge-commit
stage. Not sure if this will work.
  • Loading branch information
amstilp committed Mar 23, 2024
1 parent 4d6abca commit 67e292a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ repos:
hooks:
- id: gitleaks

- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
hooks:
- id: pip-compile
stages: [pre-merge-commit]
name: pip-compile requirements.in
files: ^requirements/requirements\.(in|txt)$
- id: pip-compile
stages: [pre-merge-commit]
name: pip-compile test-requirements.in
args: [test-requirements.in]
files: ^requirements/test-requirements\.(in|txt)$
- id: pip-compile
stages: [pre-merge-commit]
name: pip-compile dev-requirements.in
args: [dev-requirements.in]
files: ^requirements/dev-requirements\.(in|txt)$

# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
Expand Down

0 comments on commit 67e292a

Please sign in to comment.