1+ fail_fast: true
12repos:
23
34 # Compare the local template version to the latest remote template version
@@ -22,21 +23,6 @@ repos:
2223 language: system
2324 entry: jupyter nbconvert --clear-output
2425
25- # Run unit tests, verify that they pass. Note that coverage is run against
26- # the ./src directory here because that is what will be committed. In the
27- # github workflow script, the coverage is run against the installed package
28- # and uploaded to Codecov by calling pytest like so:
29- # `python -m pytest --cov=<package _name > --cov-report=xml`
30- - repo: local
31- hooks:
32- - id: pytest-check
33- name: Run unit tests
34- description: Run unit tests with pytest.
35- entry: bash -c "if python -m pytest --co -qq; then python -m pytest --cov=./src --cov-report=html; fi"
36- language: system
37- pass_filenames: false
38- always_run: true
39-
4026 # Prevents committing directly branches named 'main' and 'master'.
4127 - repo: https://github.com/pre-commit/pre-commit-hooks
4228 rev: v4.4.0
@@ -135,6 +121,21 @@ repos:
135121 ]
136122{% endif %}
137123
124+ # Run unit tests, verify that they pass. Note that coverage is run against
125+ # the ./src directory here because that is what will be committed. In the
126+ # github workflow script, the coverage is run against the installed package
127+ # and uploaded to Codecov by calling pytest like so:
128+ # `python -m pytest --cov=<package _name > --cov-report=xml`
129+ - repo: local
130+ hooks:
131+ - id: pytest-check
132+ name: Run unit tests
133+ description: Run unit tests with pytest.
134+ entry: bash -c "if python -m pytest --co -qq; then python -m pytest --cov=./src --cov-report=html; fi"
135+ language: system
136+ pass_filenames: false
137+ always_run: true
138+
138139{% - if include_notebooks %}
139140 # Make sure Sphinx can build the documentation while explicitly omitting
140141 # notebooks from the docs, so users don't have to wait through the execution
0 commit comments