@@ -411,6 +411,7 @@ jobs:
411
411
cargo install cargo-readme --version 3.2.0 &> /dev/null || true
412
412
cargo install --locked kani-verifier &> /dev/null || true
413
413
cargo kani setup &> /dev/null || true
414
+
414
415
check-all-toolchains-tested :
415
416
runs-on : ubuntu-latest
416
417
name : Check that all toolchains listed in Cargo.toml are tested in CI
@@ -431,6 +432,22 @@ jobs:
431
432
- name : Run dependency check
432
433
run : ./ci/check_job_dependencies.sh
433
434
435
+ run-git-hooks :
436
+ runs-on : ubuntu-latest
437
+ name : Run Git hooks
438
+ steps :
439
+ - name : Install yq (for YAML parsing)
440
+ run : go install github.com/mikefarah/yq/v4@latest
441
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
442
+ - name : Run dependency check
443
+ # Ensure that Git hooks execute successfully.
444
+ #
445
+ # Note that this runs all hooks. As of this writing, the only Git hook
446
+ # is `pre-push`. Running all hooks ensures that, if a new hook is added
447
+ # which can't run in CI (at least not using this naive setup), we'll
448
+ # notice and it will remind us to update this test.
449
+ run : set -e; for hook in ./githooks/*; do $hook; done
450
+
434
451
# Used to signal to branch protections that all other jobs have succeeded.
435
452
all-jobs-succeed :
436
453
name : All checks succeeded
@@ -441,7 +458,7 @@ jobs:
441
458
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
442
459
if : failure()
443
460
runs-on : ubuntu-latest
444
- needs : [build_test, kani, check_fmt, check_readme, check_msrv, check_versions, generate_cache, check-all-toolchains-tested, check-job-dependencies]
461
+ needs : [build_test, kani, check_fmt, check_readme, check_msrv, check_versions, generate_cache, check-all-toolchains-tested, check-job-dependencies, run-git-hooks ]
445
462
steps :
446
463
- name : Mark the job as failed
447
464
run : exit 1
0 commit comments