52
52
# This step should always run, even if previous steps fail
53
53
if : always()
54
54
55
+ # Check if HTML report exists
55
56
- name : Check if HTML report exists
56
57
run : |
57
58
if [ -d "html-report" ]; then
@@ -68,27 +69,27 @@ jobs:
68
69
# This step should always run, even if previous steps fail
69
70
if : always()
70
71
72
+ # Step to upload artifact
71
73
- name : Upload artifact
72
74
uses : actions/upload-artifact@v2
73
75
with :
74
76
name : html-report
75
77
path : html-report.zip
76
- # Specify the directory structure for the artifact
77
78
if-no-files-found : error
78
79
if : always()
79
80
81
+ # Step to generate artifact link
80
82
- name : Generate artifact link
81
83
id : artifact_link
82
- run : echo "::set-output name=artifact_url::https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/ "
84
+ run : echo "::set-output name=artifact_url::https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
83
85
if : always()
84
86
85
- # Send Slack notification once the tests are completed
87
+ # Send Slack notification with html-reprt url once the tests are completed
86
88
- name : Send Slack notification
87
89
uses : rtCamp/action-slack-notify@v2
88
90
env :
89
91
SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
90
92
SLACK_CHANNEL : " #playwright-test-reports"
91
93
SLACK_USERNAME : Playwright GitHub Actions
92
- SLACK_TITLE : Test results are available in Artifacts section of below link as html-report. ${{ steps.artifact_link.outputs.artifact_url }}.
93
- # This step should always run, even if previous steps fail
94
+ SLACK_TITLE : " Test results are available in [Artifacts section](${{ steps.artifact_link.outputs.artifact_url }}) as html-report."
94
95
if : always()
0 commit comments