Skip to content

Commit

Permalink
remove e2e-report
Browse files Browse the repository at this point in the history
  • Loading branch information
midleman committed Dec 9, 2024
1 parent e9bd917 commit 21b0864
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 131 deletions.
89 changes: 0 additions & 89 deletions .github/actions/e2e-report/action.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/actions/gen-report-dir/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Generate Report Directory"
description: "Generates a unique REPORT_DIR and appends the report URL to the GitHub Actions summary"
inputs:
bucket-url:
description: "Base URL of the S3 bucket or CDN for the report"
required: false
default: "https://d38p2avprg8il3.cloudfront.net"
runs:
using: "composite"
steps:
- name: Generate REPORT_DIR
shell: bash
run: |
# Generate a unique REPORT_DIR
RANDOM_SUFFIX=$RANDOM
REPORT_DIR="playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}"
# Export REPORT_DIR for downstream steps
echo "REPORT_DIR=$REPORT_DIR" >> $GITHUB_ENV
echo "Generated REPORT_DIR: $REPORT_DIR"
# Generate the REPORT_URL
REPORT_URL="${{ inputs.bucket-url }}/$REPORT_DIR/index.html"
echo "Report URL: $REPORT_URL"
# Append REPORT_URL to the GitHub Actions summary
echo "📄 [Playwright Report]($REPORT_URL) <br>" >> $GITHUB_STEP_SUMMARY
26 changes: 7 additions & 19 deletions .github/workflows/test-e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,19 @@ jobs:
aws-region: ${{ secrets.QA_AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate Unique REPORT_DIR
run: |
RANDOM_SUFFIX=$RANDOM
echo "REPORT_DIR=playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}" >> $GITHUB_ENV
echo "Generated REPORT_DIR: playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}"
- name: Debug REPORT_DIR
run: |
echo "REPORT_DIR: ${{ env.REPORT_DIR }}"
- name: Send HTML report URL to GitHub Summary
if: ${{ !cancelled() }}
run: |
REPORT_URL="https://d38p2avprg8il3.cloudfront.net/${{ env.REPORT_DIR }}/index.html"
echo "Report URL: $REPORT_URL"
echo "📄 [Playwright Report]($REPORT_URL) <br>" > $GITHUB_STEP_SUMMARY
# Preloading ensures the Node.js binary is fully built and ready before
# any parallel processes start, preventing runtime conflicts
- name: Preload Node.js Binary
if: ${{ inputs.project == 'e2e-browser' }}
run: yarn gulp node

- name: Get Playwright Tags
run: bash scripts/playwright-tags.sh "${{ inputs.project}}" "${{ inputs.grep }}"
- name: Get and set Playwright tags to $PW_TAGS
run: bash scripts/playwright-tags.sh "e2e-windows" "${{ inputs.grep }}"
shell: bash

- name: Send HTML Summary to GH Action Summary
if: ${{ !cancelled() }}
uses: ./.github/actions/generate-report-dir

- name: Run Playwright Tests (Electron)
env:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/test-e2e-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Test: E2E (Latest Release)"
on:
workflow_dispatch:
inputs:
e2e_grep:
grep:
required: false
description: "Grep filter to apply to the e2e tests: @pr, @win, etc."
default: ""
Expand All @@ -14,8 +14,7 @@ permissions:
contents: read

jobs:
linux:
name: e2e-electron-tests
e2e-electron:
runs-on: ubuntu-latest-8x
timeout-minutes: 45
steps:
Expand Down Expand Up @@ -72,12 +71,9 @@ jobs:
sudo update-rc.d xvfb defaults
sudo service xvfb start
- name: Send HTML report URL to GitHub Summary
- name: Send HTML Summary to GH Action Summary
if: ${{ !cancelled() }}
run: |
REPORT_URL="https://d38p2avprg8il3.cloudfront.net/${{ env.REPORT_DIR }}/index.html"
echo "Report URL: $REPORT_URL"
echo "📄 [Playwright Report]($REPORT_URL) <br>" > $GITHUB_STEP_SUMMARY
uses: ./.github/actions/generate-report-dir

- name: Run Tests (Electron)
if: ${{ !cancelled() }}
Expand All @@ -88,11 +84,11 @@ jobs:
CURRENTS_CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_attempt }}
COMMIT_INFO_MESSAGE: ${{ github.event.head_commit.message }}
PWTEST_BLOB_DO_NOT_REMOVE: 1
CURRENTS_TAG: "electron,release,${{ inputs.e2e_grep }}"
CURRENTS_TAG: "@release,${{ inputs.grep }}"
id: electron-e2e-tests
run: |
export DISPLAY=:10
BUILD=/usr/share/positron npx playwright test --project e2e-electron --workers 3 --grep=${{ env.E2E_GREP }}
BUILD=/usr/share/positron npx playwright test --project e2e-electron --workers 3 --grep=${{ env.grep }}
- name: Upload Playwright Report to S3
if: ${{ !cancelled() }}
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/test-e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,25 @@ jobs:
role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }}
aws-region: ${{ secrets.QA_AWS_REGION }}

- name: Generate Unique REPORT_DIR
shell: bash
run: |
RANDOM_SUFFIX=$RANDOM
echo "REPORT_DIR=playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}" >> $GITHUB_ENV
echo "Generated REPORT_DIR: playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}"
- name: Debug REPORT_DIR
shell: bash
run: |
echo "REPORT_DIR: ${{ env.REPORT_DIR }}"
- name: Get Playwright Tags
# - name: Generate Unique REPORT_DIR
# shell: bash
# run: |
# RANDOM_SUFFIX=$RANDOM
# echo "REPORT_DIR=playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}" >> $GITHUB_ENV
# echo "Generated REPORT_DIR: playwright-report-${{ github.run_id }}-${RANDOM_SUFFIX}"

# - name: Debug REPORT_DIR
# shell: bash
# run: |
# echo "REPORT_DIR: ${{ env.REPORT_DIR }}"

- name: Get and set Playwright tags to $PW_TAGS
run: bash scripts/playwright-tags.sh "e2e-windows" "${{ inputs.grep }}"
shell: bash

- name: Send HTML Summary to GH Action Summary
uses: ./.github/actions/generate-report-dir

- name: Run Tests on Windows (Electron)
env:
POSITRON_PY_VER_SEL: 3.10.10
Expand Down

0 comments on commit 21b0864

Please sign in to comment.