Skip to content

Commit

Permalink
feat(system): add gotestchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Dec 31, 2024
1 parent f6fb3f8 commit ec32961
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/bins/bin/gotestchanged
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# go test only the changed packages.
set -e
git status --porcelain |
awk '{print $2}' |
while read -r file; do
echo "./$(dirname "$file")/..."
done |
sort |
uniq |
tr '\n' ' ' |
xargs go test --failfast

0 comments on commit ec32961

Please sign in to comment.