From dc0e155c316cbdb3c42bc18d02080032bc3e1152 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 19 Apr 2021 17:28:40 +0530 Subject: [PATCH] Add pytest to pre-commit --- .pre-commit-config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bceacbcc..8e668f8b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,3 +33,13 @@ repos: hooks: - id: eslint args: ["monkey/monkey_island/cc/ui/src/", "--fix", "--max-warnings=0"] + - repo: local + hooks: + - id: pytest + name: pytest + entry: bash -c "cd monkey && pytest" + language: system + pass_filenames: false + # alternatively you could `types: [python]` so it only runs when python files change + # though tests might be invalidated if you were to say change a data file + always_run: true