Skip to content

Commit b7d25f8

Browse files
test: test
1 parent 2aee0c4 commit b7d25f8

File tree

1 file changed

+20
-108
lines changed

1 file changed

+20
-108
lines changed

.github/workflows/e2e.yml

+20-108
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@ jobs:
5454
name: testplane-fixtures
5555
path: test/func/fixtures/*/report
5656

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-
7057
- name: 'e2e: Run Testplane testplane-eye'
7158
continue-on-error: true
7259
id: 'testplane-testplane-eye'
@@ -80,82 +67,8 @@ jobs:
8067
cwd: 'test/func/tests'
8168
set: 'eye'
8269

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-
14870
- 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
15972

16073
- name: Deploy Testplane html-reporter reports
16174
if: ${{ env.IS_FAILED }}
@@ -166,38 +79,37 @@ jobs:
16679
destination_dir: ${{ env.DEST_REPORTS_DIR }}
16780
keep_files: true
16881

169-
- name: Construct PR comment
82+
- name: Construct failed PR comment
17083
if: ${{ env.IS_FAILED }}
17184
run: |
172-
comment="### :x: Testplane run failed\\n\\n";
85+
comment="### Testplane run failed<br><br>";
17386
readonly -a RUN_CASES=("analytics" "playwright" "plugins" "testplane-common" "testplane-eye" "testplane-tinder" "testplane-gui");
17487
for run_case in "${RUN_CASES[@]}"; do
175-
gh_step_id_raw=testplane-${run_case};
88+
gh_step_id_raw="testplane-${run_case}"
17689
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}"
17993
report_link="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.DEST_REPORTS_DIR }}/${run_case}"
18094
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
192106
done
193-
echo "PR_COMMENT=${comment}" >> $GITHUB_ENV
194-
107+
echo "FAILED_PR_COMMENT=${comment}" >> $GITHUB_ENV
195108
196109
- name: Comment PR with link to Testplane HTML report
197-
if: ${{ env.IS_FAILED }}
198110
uses: thollander/actions-comment-pull-request@v3
199111
with:
200-
message: ${{ env.PR_COMMENT }}
112+
message: $( [[ ${{ env.IS_FAILED }} ]] && echo ${{ env.FAILED_PR_COMMENT }} || echo "### ✅ Testplane run succeed" )
201113
comment-tag: testplane_html_report_link
202114

203115
- name: Fail the job if any Testplane job is failed

0 commit comments

Comments
 (0)