Skip to content

Commit 4c4113b

Browse files
committed
ci: Adds pytest-testmon to local pre-commit hooks
Closes #88 Also adds a few more things to `.gitignore`.
1 parent 5808a82 commit 4c4113b

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,13 @@ _version.py
139139
# Ignore topostats/_version.py as per setuptools_scm
140140
AFMReader/_version.py
141141

142+
# Emacs
143+
\#*
144+
*~
145+
.dir-locals.el
146+
147+
# Pytest-testmon files
148+
.testmon*
149+
142150
# Ignore tmp/ directory
143151
tmp/

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,17 @@ repos:
6565
language: system
6666
files: \.py$
6767

68+
- repo: local
69+
hooks:
70+
- id: pytest
71+
name: Pytest (testmon)
72+
entry: pytest --testmon
73+
language: system
74+
files: \.py$
75+
6876
ci:
6977
autofix_prs: true
7078
autofix_commit_msg: '[pre-commit.ci] Fixing issues with pre-commit'
7179
autoupdate_schedule: weekly
7280
autoupdate_commit_msg: '[pre-commit.ci] pre-commit-autoupdate'
73-
skip: [pylint] # Optionally list ids of hooks to skip on CI
81+
skip: [pylint, pytest] # Optionally list ids of hooks to skip on CI

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ dev = [
4848
"black",
4949
"pre-commit",
5050
"pylint",
51+
"pytest-testmon",
5152
"ruff",
5253
"setuptools_scm[toml]",
5354
"wheel"

0 commit comments

Comments
 (0)