Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling bash-unit pre-commit hook in ci + sample setup #107

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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