File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 88
99jobs :
1010 test :
11- runs-on : ubuntu-latest
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [macos-latest, ubuntu-latest]
1215 steps :
1316 - uses : actions/checkout@v4
1417 # No caching as we're expected to run rarely
1518 - name : Install dependencies and run checks
19+ shell : bash
1620 run : |
1721 set -euxo pipefail
22+ python3 -m venv venv
23+ source venv/bin/activate
1824 python3 -m pip install pre-commit
1925 export PRE_COMMIT_COLOR=always
20- pre-commit try-repo . --files .github/workflows/test-good.sh
21- for hook in shfmt shfmt-docker; do
26+ shfmt_docker=$(type docker &>/dev/null && echo shfmt-docker || :)
27+ for hook in shfmt shfmt-src $shfmt_docker; do
28+ pre-commit try-repo . $hook --files .github/workflows/test-good.sh
29+ done
30+ for hook in shfmt $shfmt_docker; do
2231 ! pre-commit try-repo . $hook --files .github/workflows/test-bad.sh
2332 ! git diff --exit-code .github/workflows/test-bad.sh
2433 git restore .github/workflows/test-bad.sh
You can’t perform that action at this time.
0 commit comments