Skip to content

Commit 50b68c0

Browse files
committed
ci: centralize verification command
1 parent 313a4ba commit 50b68c0

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ jobs:
1717
sudo apt-get install -y zsh
1818
1919
- name: Run verification commands
20-
run: |
21-
for test in tests/*.sh; do sh "$test"; done
22-
zsh -n zsh/zshrc
20+
run: scripts/verify.sh

DEVELOPMENT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ exercises the changed behavior.
2121
- For repository-wide shell checks, run:
2222

2323
```sh
24-
for test in tests/*.sh; do sh "$test"; done
25-
zsh -n zsh/zshrc
24+
scripts/verify.sh
2625
```
2726

2827
Prefer testing dotfiles contracts such as loader behavior, public environment

scripts/verify.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
5+
6+
for test in "$repo_root"/tests/*.sh; do
7+
sh "$test"
8+
done
9+
10+
zsh -n "$repo_root/zsh/zshrc"

0 commit comments

Comments
 (0)