Skip to content

Commit c51e759

Browse files
committed
CI: run pre-commit starting at 5d8b1ed62b56e4399e8bfd7c38cda23914ae930c
1 parent 5d8b1ed commit c51e759

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.gitlab-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,8 @@ pre_commit:
12391239
- python -m pip install --upgrade pip
12401240
- pip install pre-commit
12411241
script:
1242-
- pre-commit run --all-files
1242+
# Run pre-commit against all files starting from a given commit to HEAD
1243+
# This is done to avoid issues with large diffs when running pre-commit on all files (blocks the CI for ~10 minutes)
1244+
# When (if) the whole is formatted, we can remove the `--from-ref` and `--to-ref` options to always check all files
1245+
- pre-commit run --from-ref 5d8b1ed62b56e4399e8bfd7c38cda23914ae930c --to-ref HEAD --all-files
12431246
allow_failure: true
1244-
when: manual # disabled for now because it takes too much time to run due to big changes

0 commit comments

Comments
 (0)