From 52cab1db5ceda420110339c7de27173ffbdbe19c Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 23 Sep 2020 17:59:22 +0300 Subject: Add pre-commit yaml --- .pre-commit-config.yaml | 22 ++++++++++++++++++++++ README.md | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..72538a9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +fail_fast: true +repos: +- repo: local + hooks: + - id: format + name: Format + stages: [commit] + language: system + entry: pipenv run format + types: [python] + - id: lint + name: Lint + stages: [commit] + language: system + entry: pipenv run lint + types: [python] + - id: test + name: Test + stages: [commit] + language: system + entry: pipenv run test + types: [python] diff --git a/README.md b/README.md index 4e710d9..e9eead5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ## Dev ```bash -$ pipenv sync +$ pipenv sync -d +$ pipenv run pre-commit install $ pipenv run server ``` -- cgit v1.3.1