5252 # This step should always run, even if previous steps fail
5353 if : always()
5454
55+ # Check if HTML report exists
5556 - name : Check if HTML report exists
5657 run : |
5758 if [ -d "html-report" ]; then
@@ -68,27 +69,27 @@ jobs:
6869 # This step should always run, even if previous steps fail
6970 if : always()
7071
72+ # Step to upload artifact
7173 - name : Upload artifact
7274 uses : actions/upload-artifact@v2
7375 with :
7476 name : html-report
7577 path : html-report.zip
76- # Specify the directory structure for the artifact
7778 if-no-files-found : error
7879 if : always()
7980
81+ # Step to generate artifact link
8082 - name : Generate artifact link
8183 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 }}"
8385 if : always()
8486
85- # Send Slack notification once the tests are completed
87+ # Send Slack notification with html-reprt url once the tests are completed
8688 - name : Send Slack notification
8789 uses : rtCamp/action-slack-notify@v2
8890 env :
8991 SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
9092 SLACK_CHANNEL : " #playwright-test-reports"
9193 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."
9495 if : always()
0 commit comments