Skip to content

Commit dd4bbe7

Browse files
committed
added verify test case
1 parent 39eec7f commit dd4bbe7

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate Action
1+
name: Continuous Integration
22

33
on:
44
push:
@@ -44,8 +44,21 @@ jobs:
4444
4545
- name: Test Case 2 - Composite Action - No Return
4646
uses: ./
47+
id: test-no-return
4748
with:
4849
label: "Self-Test-No-Return"
49-
post-target: github-step-summary
5050
script: |
5151
console.log("Expect error: script does not return string.");
52+
- name: Capture output
53+
run: |
54+
# This step uses `run` to execute a shell command
55+
./action.sh > test_no_return.log 2>&1 || true
56+
57+
- name: Verify Test Case 2 output
58+
run: |
59+
if grep -q "💡 Hint: Your script returned a non-string value (e.g., object, array, or undefined) — or nothing at all." test_no_return.log; then
60+
echo "✅ Output contains the expected hint."
61+
else
62+
echo "❌ Output does NOT contain the expected hint."
63+
exit 1
64+
fi

0 commit comments

Comments
 (0)