Skip to content

Commit f9e22cb

Browse files
authored
Add --github-output flag to e2e tests when running in GitHub Actions (#1143)
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent 6ca2d3c commit f9e22cb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/e2e/run_tests.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,18 @@ echo ""
5555

5656
# Run the tests
5757
cd "$(dirname "$0")"
58-
if ginkgo run --timeout="$TEST_TIMEOUT" --vv --show-node-events --trace .; then
58+
59+
# Build ginkgo command with conditional GitHub output flag
60+
GINKGO_CMD="ginkgo run --timeout=\"$TEST_TIMEOUT\""
61+
if [ -n "$GITHUB_ACTIONS" ]; then
62+
echo -e "${GREEN}${NC} GitHub Actions detected, enabling GitHub output format"
63+
GINKGO_CMD="$GINKGO_CMD --github-output"
64+
else
65+
GINKGO_CMD="$GINKGO_CMD --vv --show-node-events --trace"
66+
fi
67+
GINKGO_CMD="$GINKGO_CMD ."
68+
69+
if eval "$GINKGO_CMD"; then
5970
echo ""
6071
echo -e "${GREEN}✓ All E2E tests passed!${NC}"
6172
exit 0

0 commit comments

Comments
 (0)