diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0e849e59f9..a52dca55a7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +default_install_hook_types: [pre-commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 @@ -16,3 +17,14 @@ repos: - id: ruff args: [ --fix ] - id: ruff-format + +- repo: local + hooks: + - id: pytest + name: pytest + entry: pytest + args: [-n, auto, tests/ert/unit_tests, --hypothesis-profile=fast, -m, not integration_test] + language: system + types: [python] + stages: [pre-push] + pass_filenames: false diff --git a/README.md b/README.md index 9f77ae49b26..8797b8d53be 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,14 @@ $ pip install pre-commit $ pre-commit install ``` +There is also a pre-push hook configured in `pre-commit` to run a collaction of +relatively fast tests, to install this hook: + +```sh +$ pre-commit install --hook-type pre-push +``` + + ### Trouble with setup As a simple test of your `ert` installation, you may try to run one of the