Upgrade E2E dependencies (#3370)

* Disable Windows job

* Fix linux Darkmode test
This commit is contained in:
yasser khan
2025-03-12 01:58:34 +05:30
committed by GitHub
parent fe7878c936
commit 9090f243b3
6 changed files with 1010 additions and 5498 deletions

View File

@@ -27,7 +27,7 @@ on:
default: "ubuntu-22.04"
nightly:
type: boolean
description: "True if this is nigtly build"
description: "True if this is nightly build"
required: false
default: false
cmt:
@@ -140,7 +140,7 @@ jobs:
with:
python-version: "3.10"
## Linux Depdendencies
## Linux Dependencies
- name: e2e/install-dependencies-linux
if: runner.os == 'Linux'
env:
@@ -148,7 +148,7 @@ jobs:
run: |
wget -qO - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/Release.key | sudo apt-key add -
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.20.1/yq_linux_amd64 && chmod a+x /usr/local/bin/yq
sudo apt-get update || true && sudo apt-get install -y ca-certificates libxtst-dev libpng++-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu jq icnsutils graphicsmagick tzdata xsel
sudo apt-get update || true && sudo apt-get install -y ca-certificates libxtst-dev libpng++-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu jq icnsutils graphicsmagick tzdata xsel libgtk-3-0 libnss3 libxss1 libasound2
sudo apt-get install -y xvfb
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x24 &
@@ -176,6 +176,7 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
choco install yq --version 4.15.1 -y
choco install vcredist-all -y
npm i -g node-gyp
node-gyp install
node-gyp install --devdir="C:\Users\runneradmin\.electron-gyp" --target=$(jq -r .devDependencies.electron package.json) --dist-url="https://electronjs.org/headers"
@@ -186,18 +187,41 @@ jobs:
npx electron-rebuild --platform=win32 -f -t prod,optional,dev -w robotjs --module-dir ../
npm install mochawesome-report-generator
- name: e2e/run-playright-tests-${{ runner.os }}
- name: e2e/run-playright-tests-linux
if: runner.os == 'Linux'
run: |
if [ ${{ runner.os }} == 'Linux' ]; then
export DISPLAY=:99
Xvfb $DISPLAY -screen 0 1280x960x24 > /dev/null 2>&1 &
fi
export DISPLAY=:99
Xvfb $DISPLAY -screen 0 1280x960x24 > /dev/null 2>&1 &
npm run build-test
cd e2e
npm run run:e2e || true # making job pass even if the tests fail due to flakyness
xvfb-run -a npm run run:e2e || true
npm run send-report
env:
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION}}
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION }}
DESKTOP_VERSION: ${{ inputs.DESKTOP_VERSION }}
- name: e2e/run-playright-tests-macos
if: runner.os == 'macOS'
run: |
sudo spctl --master-disable
xattr -dr com.apple.quarantine ./node_modules/electron
npm run build-test
cd e2e
npm run run:e2e || true
npm run send-report
env:
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION }}
DESKTOP_VERSION: ${{ inputs.DESKTOP_VERSION }}
- name: e2e/run-playright-tests-windows
if: runner.os == 'Windows'
run: |
npm run build-test
cd e2e
npm run run:e2e || true
npm run send-report
env:
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION }}
DESKTOP_VERSION: ${{ inputs.DESKTOP_VERSION }}
- name: e2e/analyze-flaky-tests

View File

@@ -69,36 +69,37 @@ jobs:
runs-on: macos-13
DESKTOP_VERSION: ${{ inputs.version_name || github.head_ref || github.ref }}
e2e-windows:
if: ${{
(
(inputs.job_name == 'e2e-windows' || inputs.job_name == 'All')
&&
github.event_name == 'workflow_dispatch'
) ||
(
github.event_name == 'push'
) ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.labels &&
contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests')
)
}}
uses: ./.github/workflows/e2e-functional-template.yml
secrets: inherit
with:
runs-on: windows-2022
DESKTOP_VERSION: ${{ inputs.version_name || github.head_ref || github.ref }}
# TODO: Uncomment when https://mattermost.atlassian.net/browse/MM-63397 is resolved
# e2e-windows:
# if: ${{
# (
# (inputs.job_name == 'e2e-windows' || inputs.job_name == 'All')
# &&
# github.event_name == 'workflow_dispatch'
# ) ||
# (
# github.event_name == 'push'
# ) ||
# (
# github.event_name == 'pull_request' &&
# github.event.pull_request.labels &&
# contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests')
# )
# }}
# uses: ./.github/workflows/e2e-functional-template.yml
# secrets: inherit
# with:
# runs-on: windows-2022
# DESKTOP_VERSION: ${{ inputs.version_name || github.head_ref || github.ref }}
e2e-remove-label:
if: ${{ always() && contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests') }}
needs: [e2e-linux, e2e-macos, e2e-windows]
needs: [e2e-linux, e2e-macos] #, e2e-windows] TODO: Uncomment when https://mattermost.atlassian.net/browse/MM-63397 is resolved
runs-on: ubuntu-22.04
env:
COMMENT_BODY_LINUX: "${{ needs.e2e-linux.outputs.COMMENT_BODY }}"
COMMENT_BODY_MACOS: "${{ needs.e2e-macos.outputs.COMMENT_BODY }}"
COMMENT_BODY_WINDOWS: "${{ needs.e2e-windows.outputs.COMMENT_BODY }}"
# COMMENT_BODY_WINDOWS: "${{ needs.e2e-windows.outputs.COMMENT_BODY }}"
steps:
- name: e2e/unify-comments-in-single-comment
run: |