Skip to content

Commit

Permalink
Feat: Add run examples task (#816)
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuel Pargov <[email protected]>
  • Loading branch information
bamzedev authored Oct 11, 2023
1 parent 96cb3fe commit edb3f18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,20 @@ tasks:
"test:integration":
cmds:
- go test -tags="e2e" -v -timeout 9999s
run-examples:
cmds:
- |
for example in examples/*; do
if [ -d "$example" ]; then
pushd "$example" > /dev/null
if [ -f main.go ]; then
echo "Running $example/main.go"
go run main.go
if [ $? -ne 0 ]; then
echo "Error: $example/main.go failed"
exit 1
fi
fi
popd > /dev/null
fi
done

0 comments on commit edb3f18

Please sign in to comment.