Skip to content

Commit

Permalink
chore(pre-commit): Optimize pytest configuration for selective test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
beduffy committed Feb 15, 2025
1 parent 3dbd2d0 commit e42c3eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ repos:
name: pytest
entry: ./scripts/run_pytest.sh
language: system
pass_filenames: false
always_run: true
pass_filenames: true # Only run tests related to changed files
args: [-v, --cov=./, --cov-report=term]
files: ^src/|^tests/ # Only trigger when source or test files change
exclude: ^docs/|^examples/ # Exclude non-code directories
always_run: false # Don't run if no relevant files changed

0 comments on commit e42c3eb

Please sign in to comment.