Skip to content

Commit

Permalink
Only run pre-commit on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Dec 21, 2024
1 parent a669340 commit e52048c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ jobs:
with:
python-version: "3.10"

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
id: file_changes
uses: trilom/[email protected]
with:
output: ' '

- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
# Run all pre-commit hooks on all the files.
# Getting only staged files can be tricky in case a new PR is opened
# since the action is run on a branch in detached head state
name: Install and Run Pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}

build:
name: test geometric_features - python ${{ matrix.python-version }}
Expand Down

0 comments on commit e52048c

Please sign in to comment.