Skip to content

Run E2E test on Modern client #274

Run E2E test on Modern client

Run E2E test on Modern client #274

name: Run E2E test on Modern client
# This workflow is used to test our widgets against the modern client(react) on every day-of-week.
on:
schedule:
# At 04:00 on every day-of-week.
- cron: "0 04 * * 1-5"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e:
name: Run automated end-to-end tests on Modern client
runs-on: ubuntu-latest
permissions:
packages: read
contents: read
strategy:
# when one test fails, DO NOT cancel the other
fail-fast: false
matrix:
# run 3 copies of the current job in parallel
index: [0, 1, 2]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: "Executing E2E tests"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODERN_CLIENT: --modern-web-client --ignore-unsupported-widgets
run: >-
node
./automation/run-e2e/bin/run-e2e-in-chunks.mjs
--chunks 3
--index ${{ matrix.index }}
--event-name ${{ github.event_name }}
- name: "Fixing files permissions"
if: failure()
run: |
sudo find ${{ github.workspace }}/packages/* -type d -exec chmod 755 {} \;
sudo find ${{ github.workspace }}/packages/* -type f -exec chmod 644 {} \;
- name: "Archive test screenshot diff results"
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
if: failure()
with:
name: test-screenshot-results
path: |
${{ github.workspace }}/packages/**/tests/e2e/screenshot-results/diff/**/*.png
${{ github.workspace }}/packages/**/tests/e2e/screenshot-results/TESTFAIL_*.png
${{ github.workspace }}/packages/**/cypress-visual-screenshots/diff/*.png
${{ github.workspace }}/packages/**/cypress-visual-screenshots/comparison/*.png
${{ github.workspace }}/packages/**/cypress/videos/*.mp4
if-no-files-found: error