diff --git a/.github/actions/gen-report-dir/action.yml b/.github/actions/gen-report-dir/action.yml index 22745fc3fa18..1714a553a961 100644 --- a/.github/actions/gen-report-dir/action.yml +++ b/.github/actions/gen-report-dir/action.yml @@ -5,10 +5,18 @@ inputs: description: "Base URL of the S3 bucket or CDN for the report" required: false default: "https://d38p2avprg8il3.cloudfront.net" +outputs: + report-dir: + description: "The generated unique report directory name" + value: ${{ steps.generate-report-dir.outputs.report_dir }} + report-url: + description: "The URL to the generated report" + value: ${{ steps.generate-report-dir.outputs.report_url }} runs: using: "composite" steps: - name: Generate REPORT_DIR + id: generate-report-dir shell: bash run: | # Generate a unique REPORT_DIR @@ -17,12 +25,14 @@ runs: # Export REPORT_DIR for downstream steps echo "REPORT_DIR=$REPORT_DIR" >> $GITHUB_ENV + echo "report_dir=$REPORT_DIR" >> $GITHUB_OUTPUT echo "Generated REPORT_DIR: $REPORT_DIR" # Generate the REPORT_URL REPORT_URL="${{ inputs.bucket-url }}/$REPORT_DIR/index.html" echo "Report URL: $REPORT_URL" echo "REPORT_URL=$REPORT_URL" >> $GITHUB_ENV + echo "report_url=$REPORT_URL" >> $GITHUB_OUTPUT # Append REPORT_URL to the GitHub Step summary echo "📄 [Playwright Report]($REPORT_URL)
" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/test-e2e-release.yml b/.github/workflows/test-e2e-release.yml index 1a2e6434c174..800f9a9fa078 100644 --- a/.github/workflows/test-e2e-release.yml +++ b/.github/workflows/test-e2e-release.yml @@ -94,6 +94,7 @@ jobs: - name: Send Results to GH Summary uses: ./.github/actions/gen-report-dir + id: gen_report if: ${{ !cancelled() }} - name: Transform to Playwright Tags $PW_TAGS @@ -124,6 +125,14 @@ jobs: role-to-assume: ${{ secrets.AWS_TEST_REPORTS_ROLE }} report-dir: ${{ env.REPORT_DIR }} + - name: Persist Junit report for Slack Notification + uses: midleman/slack-workflow-status/.github/actions/upload-artifacts@master + if: ${{ !cancelled() }} + with: + job_name: ${{ github.job }} + junit_path: 'test-results/junit.xml' + report_url: ${{ steps.gen_report.outputs.report_url }} + slack-notify: needs: [e2e-electron] runs-on: ubuntu-latest @@ -140,3 +149,5 @@ jobs: slack_token: ${{ secrets.SLACK_TOKEN_TEST_STATUS }} slack_channel: "#positron-test-results" notify_on: ${{ env.notify_on }} + comment_junit_failures: true + emoji_junit_failures: ":small-red-x:" diff --git a/.github/workflows/test-e2e-ubuntu.yml b/.github/workflows/test-e2e-ubuntu.yml index 15ace72abb51..75f4f9fb1ec1 100644 --- a/.github/workflows/test-e2e-ubuntu.yml +++ b/.github/workflows/test-e2e-ubuntu.yml @@ -174,6 +174,7 @@ jobs: run: npm run gulp node - name: Send Results to GH Summary + id: gen_report uses: ./.github/actions/gen-report-dir - name: Alter AppArmor Restrictions for Playwright (Electron) @@ -260,3 +261,11 @@ jobs: TESTRAIL_TITLE: ${{ inputs.project }} TESTRAIL_PROJECT: "Positron" TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} + + - name: Persist Junit report for Slack Notification + uses: midleman/slack-workflow-status/.github/actions/upload-artifacts@master + if: ${{ !cancelled() }} + with: + job_name: ${{ github.job }} + junit_path: 'test-results/junit.xml' + report_url: ${{ steps.gen_report.outputs.report_url }} diff --git a/.github/workflows/test-e2e-windows.yml b/.github/workflows/test-e2e-windows.yml index 09458c9c4745..fbacc60b2433 100644 --- a/.github/workflows/test-e2e-windows.yml +++ b/.github/workflows/test-e2e-windows.yml @@ -209,3 +209,11 @@ jobs: TESTRAIL_TITLE: "e2e-windows" TESTRAIL_PROJECT: "Positron" TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }} + + - name: Persist Junit report for Slack Notification + uses: midleman/slack-workflow-status/.github/actions/upload-artifacts@master + if: ${{ !cancelled() }} + with: + job_name: ${{ github.job }} + junit_path: 'test-results/junit.xml' + report_url: ${{ steps.gen_report.outputs.report_url }} diff --git a/.github/workflows/test-merge.yml b/.github/workflows/test-merge.yml index 8364a339b135..98f029aa0cd6 100644 --- a/.github/workflows/test-merge.yml +++ b/.github/workflows/test-merge.yml @@ -69,5 +69,7 @@ jobs: slack_token: ${{ secrets.SLACK_TOKEN_TEST_STATUS }} slack_channel: "#positron-test-results" notify_on: "failure" + comment_junit_failures: true + emoji_junit_failures: ":small-red-x:"