Skip to content
Draft
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
14 changes: 7 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# No caching as we're expected to run rarely
- name: Install dependencies and run checks
- uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1
with:
cache: false
install-only: true
- name: Run checks
shell: bash
run: |
set -euxo pipefail
python3 -m venv venv
source venv/bin/activate
python3 -m pip install pre-commit
export PRE_COMMIT_COLOR=always
shfmt_docker=$(type docker &>/dev/null && echo shfmt-docker || :)
for hook in shfmt shfmt-src $shfmt_docker; do
pre-commit try-repo . $hook --files .github/workflows/test-good.sh
prek try-repo . $hook --files .github/workflows/test-good.sh
done
for hook in shfmt $shfmt_docker; do
! pre-commit try-repo . $hook --files .github/workflows/test-bad.sh
! prek try-repo . $hook --files .github/workflows/test-bad.sh
! git diff --exit-code .github/workflows/test-bad.sh
git restore .github/workflows/test-bad.sh
done
Loading