Skip to content

Commit e283b39

Browse files
committed
added test cases
1 parent 8195562 commit e283b39

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
run: |
2020
yq eval '.' action.yml > /dev/null
2121
22-
- name: Test Case 1 - Composite Action - Success Path
22+
- name: Test Case 1 - Composite Action - Success Path with Defaults
2323
uses: ./
24+
id: test-success-path-defaults
2425
with:
25-
label: "Self-Test"
26-
post-target: github-step-summary
26+
label: "test-success-path-defaults"
2727
script: |
2828
console.log("✅ github-script-post-comment action executed in CI.");
2929
return "Self-test successful.";
@@ -47,7 +47,7 @@ jobs:
4747
id: test-no-return
4848
continue-on-error: true
4949
with:
50-
label: "Self-Test-No-Return"
50+
label: "test-no-return"
5151
script: |
5252
console.log("Expect error: script does not return string.");
5353
@@ -56,7 +56,27 @@ jobs:
5656
id: test-return-non-string
5757
continue-on-error: true
5858
with:
59-
label: "Self-Test-Return-Non-String"
59+
label: "test-return-non-string"
6060
script: |
6161
console.log("Expect error: script returns non-string.");
6262
return {title: "Test Case 3", message: "test case return non-string", score: 50};
63+
64+
- name: Test Case 4 - Composite Action - Success Path with github-step-summary
65+
uses: ./
66+
id: test-success-path-github-step-summary
67+
with:
68+
label: "test-success-path-github-step-summary"
69+
post-target: github-step-summary
70+
script: |
71+
console.log("✅ github-script-post-comment action executed in CI.");
72+
return "Self-test successful.";
73+
74+
- name: Test Case 5 - Composite Action - Success Path with pull-request
75+
uses: ./
76+
id: test-success-path-pull-request
77+
with:
78+
label: "test-success-path-pull-request"
79+
post-target: pull-request
80+
script: |
81+
console.log("✅ github-script-post-comment action executed in CI.");
82+
return "Self-test successful.";

0 commit comments

Comments
 (0)