Skip to content

Commit

Permalink
run all tests in one workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Dec 1, 2024
1 parent dabb721 commit 30d2fcb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/test_subfolders.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"

# Iterate through all subfolders with their own go.mod and run tests
for dir in $(find . -name "go.mod" -not -path "./go.mod" -exec dirname {} \;); do
echo "Running tests in $dir..."

# Run tests normally in all other directories
(cd "$dir" && go test ./... -short)
done

0 comments on commit 30d2fcb

Please sign in to comment.