diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c688e20b..dc2d2df4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -95,6 +95,10 @@ jobs: run: sudo apt-get install -y libyaml-dev - name: Install capa run: pip install -e .[dev] + - name: Run tests (fast) + # this set of tests runs about 80% of the cases in 20% of the time, + # and should catch most errors quickly. + run: pre-commit run pytest-fast --all-files - name: Run tests run: pytest -v tests/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbc6e80f..7e73306c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -109,3 +109,21 @@ repos: - "tests/" always_run: true pass_filenames: false + +- repo: local + hooks: + - id: pytest-fast + name: pytest (fast) + stages: [] + language: system + entry: pytest + args: + - "tests/" + - "--ignore=tests/test_binja_features.py" + - "--ignore=tests/test_ghidra_features.py" + - "--ignore=tests/test_ida_features.py" + - "--ignore=tests/test_viv_features.py" + - "--ignore=tests/test_main.py" + - "--ignore=tests/test_scripts.py" + always_run: true + pass_filenames: false