54
54
name : testplane-fixtures
55
55
path : test/func/fixtures/*/report
56
56
57
- - name : ' e2e: Run Testplane testplane-common'
58
- continue-on-error : true
59
- id : ' testplane-testplane-common'
60
- uses :
gemini-testing/[email protected]
61
- env :
62
- TOOL : testplane
63
- PROJECT_UNDER_TEST : testplane
64
- SERVER_PORT : 8061
65
- html_reporter_path : html-reporter-reports/testplane-common
66
- with :
67
- cwd : ' test/func/tests'
68
- set : ' common'
69
-
70
57
- name : ' e2e: Run Testplane testplane-eye'
71
58
continue-on-error : true
72
59
id : ' testplane-testplane-eye'
80
67
cwd : ' test/func/tests'
81
68
set : ' eye'
82
69
83
- - name : ' e2e: Run Testplane testplane-gui'
84
- continue-on-error : true
85
- id : ' testplane-testplane-gui'
86
- uses :
gemini-testing/[email protected]
87
- env :
88
- TOOL : testplane
89
- PROJECT_UNDER_TEST : testplane-gui
90
- SERVER_PORT : 8063
91
- html_reporter_path : html-reporter-reports/testplane-gui
92
- with :
93
- cwd : ' test/func/tests'
94
- set : ' common-gui'
95
-
96
- - name : ' e2e: Run Testplane playwright'
97
- continue-on-error : true
98
- id : ' testplane-playwright'
99
- uses :
gemini-testing/[email protected]
100
- env :
101
- TOOL : playwright
102
- PROJECT_UNDER_TEST : playwright
103
- SERVER_PORT : 8065
104
- html_reporter_path : html-reporter-reports/playwright
105
- with :
106
- cwd : ' test/func/tests'
107
- set : ' common'
108
-
109
- - name : ' e2e: Run Testplane plugins'
110
- continue-on-error : true
111
- id : ' testplane-plugins'
112
- uses :
gemini-testing/[email protected]
113
- env :
114
- TOOL : testplane
115
- PROJECT_UNDER_TEST : plugins
116
- SERVER_PORT : 8064
117
- html_reporter_path : html-reporter-reports/plugins
118
- with :
119
- cwd : ' test/func/tests'
120
- set : ' plugins'
121
-
122
- - name : ' e2e: Run Testplane testplane-tinder'
123
- continue-on-error : true
124
- id : ' testplane-testplane-tinder'
125
- uses :
gemini-testing/[email protected]
126
- env :
127
- TOOL : testplane
128
- PROJECT_UNDER_TEST : testplane-gui
129
- SERVER_PORT : 8084
130
- html_reporter_path : html-reporter-reports/testplane-tinder
131
- with :
132
- cwd : ' test/func/tests'
133
- set : ' common-tinder'
134
-
135
- - name : ' e2e: Run Testplane analytics'
136
- continue-on-error : true
137
- id : ' testplane-analytics'
138
- uses :
gemini-testing/[email protected]
139
- env :
140
- TOOL : testplane
141
- PROJECT_UNDER_TEST : analytics
142
- SERVER_PORT : 8085
143
- html_reporter_path : html-reporter-reports/analytics
144
- with :
145
- cwd : ' test/func/tests'
146
- set : ' analytics'
147
-
148
70
- name : Check for failures
149
- run : |
150
- if [ "${{ steps.testplane-analytics.outcome }}" == "failure" ] || \
151
- [ "${{ steps.testplane-playwright.outcome }}" == "failure" ] || \
152
- [ "${{ steps.testplane-plugins.outcome }}" == "failure" ] || \
153
- [ "${{ steps.testplane-testplane-common.outcome }}" == "failure" ] || \
154
- [ "${{ steps.testplane-testplane-eye.outcome }}" == "failure" ] || \
155
- [ "${{ steps.testplane-testplane-tinder.outcome }}" == "failure" ] || \
156
- [ "${{ steps.testplane-testplane-gui.outcome }}" == "failure" ]; then
157
- echo "IS_FAILED=true" >> $GITHUB_ENV
158
- fi
71
+ run : echo "IS_FAILED=true" >> $GITHUB_ENV
159
72
160
73
- name : Deploy Testplane html-reporter reports
161
74
if : ${{ env.IS_FAILED }}
@@ -166,38 +79,37 @@ jobs:
166
79
destination_dir : ${{ env.DEST_REPORTS_DIR }}
167
80
keep_files : true
168
81
169
- - name : Construct PR comment
82
+ - name : Construct failed PR comment
170
83
if : ${{ env.IS_FAILED }}
171
84
run : |
172
- comment="### :x: Testplane run failed\\n\\n ";
85
+ comment="### ❌ Testplane run failed<br><br> ";
173
86
readonly -a RUN_CASES=("analytics" "playwright" "plugins" "testplane-common" "testplane-eye" "testplane-tinder" "testplane-gui");
174
87
for run_case in "${RUN_CASES[@]}"; do
175
- gh_step_id_raw=testplane-${run_case};
88
+ gh_step_id_raw=" testplane-${run_case}"
176
89
gh_step_id="${gh_step_id_raw//-/_}"
177
- outcome_var="STEPS_${gh_step_id^^}_OUTCOME"
178
- outcome="${!outcome_var:-UNDEFINED}
90
+ gh_step_id_upper=$(echo "$gh_step_id" | tr '[:lower:]' '[:upper:]')
91
+ outcome_var="STEPS_${gh_step_id_upper}_OUTCOME"
92
+ outcome="${!outcome_var:-UNDEFINED}"
179
93
report_link="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.DEST_REPORTS_DIR }}/${run_case}"
180
94
181
- case "$outcome" in
182
- "success")
183
- comment+="- ✅ $run_case: success. <a href=\"${report_link}\" target=\"_blank\">Report link</a>"
184
- ;;
185
- "failure"|"cancelled")
186
- comment+="- ❌ $run_case: failed. <a href=\"${report_link}\" target=\"_blank\">Report link</a>"
187
- ;;
188
- *)
189
- comment+="- ⚠️ $run_case: unknown. <a href=\"${report_link}\" target=\"_blank\">Report link</a>"
190
- ;;
191
- esac
95
+ case "$outcome" in
96
+ "success")
97
+ comment+="- ✅ $run_case: success. <a href=\"${report_link}\" target=\"_blank\">Report link</a><br><br >"
98
+ ;;
99
+ "failure"|"cancelled")
100
+ comment+="- ❌ $run_case: failed. <a href=\"${report_link}\" target=\"_blank\">Report link</a><br><br >"
101
+ ;;
102
+ *)
103
+ comment+="- ⚠️ $run_case: unknown. <a href=\"${report_link}\" target=\"_blank\">Report link</a><br><br >"
104
+ ;;
105
+ esac
192
106
done
193
- echo "PR_COMMENT=${comment}" >> $GITHUB_ENV
194
-
107
+ echo "FAILED_PR_COMMENT=${comment}" >> $GITHUB_ENV
195
108
196
109
- name : Comment PR with link to Testplane HTML report
197
- if : ${{ env.IS_FAILED }}
198
110
uses : thollander/actions-comment-pull-request@v3
199
111
with :
200
- message : ${{ env.PR_COMMENT }}
112
+ message : $( [[ $ {{ env.IS_FAILED }} ]] && echo ${{ env.FAILED_PR_COMMENT }} || echo "### ✅ Testplane run succeed" )
201
113
comment-tag : testplane_html_report_link
202
114
203
115
- name : Fail the job if any Testplane job is failed
0 commit comments