Skip to content

Commit

Permalink
Calling bash-unit pre-commit hook in ci + sample setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd authored and pgrange committed Feb 26, 2024
1 parent 644c19e commit 0e1131d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ jobs:
run: |
set -o pipefail
pre-commit gc
# Run default pre-commit hooks
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG}
# Run manual pre-commit hook that runs bash_unit@rev
# defined in .pre-commit-config.yaml
pre-commit run bash-unit --hook-stage manual -a | tee -a ${RAW_LOG}
# Run this version of bash_unit using it's current pre-commit-hook.yaml config
# Useful for testing that the current version works
pre-commit try-repo . --verbose --all-files | tee -a ${RAW_LOG}
- name: Convert Raw Log to annotations
uses: mdeweerd/[email protected]
if: ${{ failure() }}
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,11 @@ repos:
language: system
entry: bash -c "./bash_unit tests/*"
pass_filenames: false

- repo: https://github.com/pgrange/bash_unit
rev: 308c139639269b89c26911098b7739ee2400fcbd
hooks:
- id: bash-unit
stages: [manual]
always_run: true
verbose: true

0 comments on commit 0e1131d

Please sign in to comment.