Fix bad path name for user data dir, upgrade node-abi (#3406)
* Fix bad path name for user data dir, upgrade node-abi * Run windows e2e * Enable Windows tests and fix linux e2e crash * chore: remove redundant dependencies and environment variables in e2e workflow * fix: resolve Linux GPU process initialization errors in GitHub Actions * Fix linux tests * Fix lint * fix: Enhance GPU handling to prevent process crashes in E2E tests This commit addresses GPU-related stability issues in our E2E test environment by: 1. Updating GPU helper utility with more comprehensive disabling methods 2. Adding environment variables to force software rendering 3. Configuring Electron to use in-process GPU rendering 4. Adding additional Linux dependencies for better GPU support 5. Expanding command-line flags to mitigate GPU process crashes The changes include modifications to: - e2e/utils/gpu-helper.js - e2e/modules/environment.js - .github/workflows/e2e-functional-template.yml - .github/actions/install-os-dependencies/action.yaml * Fix linux tests * Fix linux tests * Fix linux tests * Fix linux tests * Fix linux tests * Revert "chore: remove redundant dependencies and environment variables in e2e workflow" This reverts commit 6a8eb0cbee155c3fd3f26df8d45af8c1f5cf2f12. * run tests with xvfb-run --auto-servernum * change ubuntu-runner to use latest * change ubuntu-runner to use 24.04 version * fix linux tests * fix linux tests * add preload test script * add preload test script * add preload test script * update preload script * reset all changes made to fix linux e2e error * reset all changes made to fix linux e2e error * reset all changes made to fix linux e2e error * fix linux package instalation * fix chrome sandbox permission issue * bump electron version to 36.1.0 * Revert "bump electron version to 36.1.0" This reverts commit 4a9bf858754c0c1909b3626f703578913adf3714. * install dbus and declare DBUS_SYSTEM_BUS_ADDRESS * fix dbus error * fix dbus error * fix dbus error * fix dbus error * fix: Try the community suggestion - https://github.com/actions/runner-images/issues/12127#issuecomment-2854346891 * change libasound2 to libasound2t64 * use gcc-12-aarch64-linux-gnu instead of gcc-aarch64-linux-gnu * remove multilib * fix xvfb crash * fix: add PW_CHROMIUM_ARGS * fix: add --disable-gpu-sandbox to the e2e run command * fix: windows job * pass version to electron rebuild * fix post install script under /e2e * Revert "fix post install script under /e2e" This reverts commit 01efeed2e5038684c0aea5bb0be837b7041be8ca. * skip postinstall scipt for windows job * hardcode electron version in the e2e/package.json * update script * Revert "update script" This reverts commit 078d197e44dc78972876a977f4a91182d89024b6. * update script * reset * upgrade electron/rebuild package * Revert "upgrade electron/rebuild package" This reverts commit 25b144df05152b0bc112db6473263bfd68850874. * Patch electron/rebuild * Fix macOS test --------- Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
@@ -13,25 +13,50 @@ runs:
|
||||
if: inputs.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
# Add Wine repository key
|
||||
wget -qO - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/Release.key | sudo apt-key add -
|
||||
|
||||
# Install yq binary
|
||||
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
|
||||
|
||||
# Update package lists
|
||||
sudo apt-get update || true
|
||||
|
||||
# Install required packages
|
||||
sudo apt-get install -y \
|
||||
ca-certificates \
|
||||
build-essential \
|
||||
clang \
|
||||
libdbus-1-dev \
|
||||
libgtk-3-dev \
|
||||
libnotify-dev \
|
||||
libasound2-dev \
|
||||
libcap-dev \
|
||||
libcups2-dev \
|
||||
libxtst-dev \
|
||||
libxss1 \
|
||||
libnss3-dev \
|
||||
curl \
|
||||
gperf \
|
||||
bison \
|
||||
python3-dbusmock \
|
||||
openjdk-8-jre \
|
||||
ca-certificates \
|
||||
libpng++-dev \
|
||||
gcc-aarch64-linux-gnu \
|
||||
g++-aarch64-linux-gnu \
|
||||
gcc-12-aarch64-linux-gnu \
|
||||
g++-12-aarch64-linux-gnu \
|
||||
jq \
|
||||
icnsutils \
|
||||
graphicsmagick \
|
||||
tzdata \
|
||||
xsel \
|
||||
xvfb \
|
||||
x11-utils \
|
||||
libgtk-3-0 \
|
||||
libnss3 \
|
||||
libxss1 \
|
||||
libasound2
|
||||
libasound2t64 \
|
||||
dbus \
|
||||
dbus-x11 \
|
||||
libxtst6
|
||||
|
||||
- name: Install macOS Dependencies
|
||||
if: inputs.os == 'macOS'
|
||||
|
@@ -138,6 +138,7 @@ env:
|
||||
NODE_VERSION: 18
|
||||
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION || '9.9.1' }}
|
||||
DESKTOP_VERSION: ${{ inputs.DESKTOP_VERSION }}
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
@@ -251,11 +252,13 @@ jobs:
|
||||
- name: e2e/run-playright-tests-linux
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
export DISPLAY=:99
|
||||
Xvfb $DISPLAY -screen 0 1280x960x24 > /dev/null 2>&1 &
|
||||
eval "$(dbus-launch --sh-syntax)"
|
||||
export NO_AT_BRIDGE=1
|
||||
|
||||
npm run build-test
|
||||
cd e2e
|
||||
xvfb-run -a npm run run:e2e || true
|
||||
export PW_CHROMIUM_ARGS="--disable-gpu --no-sandbox --disable-dev-shm-usage"
|
||||
xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' npm run run:e2e || true
|
||||
npm run send-report
|
||||
env:
|
||||
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION }}
|
||||
|
69
.github/workflows/e2e-functional.yml
vendored
69
.github/workflows/e2e-functional.yml
vendored
@@ -47,24 +47,23 @@ jobs:
|
||||
description: E2E tests for Mattermost desktop app on macOS have started...
|
||||
status: pending
|
||||
|
||||
# TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
|
||||
# update-initial-status-windows:
|
||||
# runs-on: ubuntu-22.04
|
||||
# if: contains(github.event.label.name, 'Run Desktop E2E Tests')
|
||||
# steps:
|
||||
# - uses: mattermost/actions/delivery/update-commit-status@main
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
# with:
|
||||
# repository_full_name: ${{ github.repository }}
|
||||
# commit_sha: ${{ github.event.pull_request.head.sha }}
|
||||
# context: e2e/windows
|
||||
# description: E2E tests for Mattermost desktop app on Windows have started...
|
||||
# status: pending
|
||||
update-initial-status-windows:
|
||||
runs-on: ubuntu-22.04
|
||||
if: contains(github.event.label.name, 'Run Desktop E2E Tests')
|
||||
steps:
|
||||
- uses: mattermost/actions/delivery/update-commit-status@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
repository_full_name: ${{ github.repository }}
|
||||
commit_sha: ${{ github.event.pull_request.head.sha }}
|
||||
context: e2e/windows
|
||||
description: E2E tests for Mattermost desktop app on Windows have started...
|
||||
status: pending
|
||||
|
||||
determine-platforms:
|
||||
if: contains(github.event.label.name, 'Run Desktop E2E Tests')
|
||||
needs: [update-initial-status-linux, update-initial-status-macos] #, update-initial-status-windows]
|
||||
needs: [update-initial-status-linux, update-initial-status-macos, update-initial-status-windows]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
platforms: ${{ steps.set-matrix.outputs.platforms }}
|
||||
@@ -73,17 +72,16 @@ jobs:
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
if [[ "${{ inputs.platform }}" == "all" ]]; then
|
||||
echo "platforms=['ubuntu-22.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
|
||||
echo "platforms=['ubuntu-24.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
|
||||
else
|
||||
case "${{ inputs.platform }}" in
|
||||
linux) echo "platforms=['ubuntu-22.04']" ;;
|
||||
linux) echo "platforms=['ubuntu-24.04']" ;;
|
||||
macos) echo "platforms=['macos-13']" ;;
|
||||
# windows) echo "platforms=['windows-2022']" ;; TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
|
||||
windows) echo "platforms=['windows-2022']"
|
||||
esac >> $GITHUB_OUTPUT
|
||||
fi
|
||||
elif [[ "${{ github.event_name }}" == "push" ]] || [[ "${{ contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests') }}" == "true" ]]; then
|
||||
echo "platforms=['ubuntu-22.04', 'macos-13']" >> $GITHUB_OUTPUT
|
||||
# echo "platforms=['ubuntu-22.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
|
||||
echo "platforms=['ubuntu-24.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "platforms=[]" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
@@ -132,22 +130,21 @@ jobs:
|
||||
status: ${{ needs.e2e-tests.outputs.STATUS_MACOS }}
|
||||
target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_MACOS }}
|
||||
|
||||
# TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
|
||||
# update-final-status-windows:
|
||||
# runs-on: ubuntu-22.04
|
||||
# needs:
|
||||
# - e2e-tests
|
||||
# steps:
|
||||
# - uses: mattermost/actions/delivery/update-commit-status@main
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
# with:
|
||||
# repository_full_name: ${{ github.repository }}
|
||||
# commit_sha: ${{ github.event.pull_request.head.sha }}
|
||||
# context: e2e/windows
|
||||
# description: Completed with ${{ needs.e2e-tests.outputs.NEW_FAILURES_WINDOWS }} failures
|
||||
# status: ${{ needs.e2e-tests.outputs.STATUS_WINDOWS }}
|
||||
# target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_WINDOWS }}
|
||||
update-final-status-windows:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- e2e-tests
|
||||
steps:
|
||||
- uses: mattermost/actions/delivery/update-commit-status@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
repository_full_name: ${{ github.repository }}
|
||||
commit_sha: ${{ github.event.pull_request.head.sha }}
|
||||
context: e2e/windows
|
||||
description: Completed with ${{ needs.e2e-tests.outputs.NEW_FAILURES_WINDOWS }} failures
|
||||
status: ${{ needs.e2e-tests.outputs.STATUS_WINDOWS }}
|
||||
target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_WINDOWS }}
|
||||
|
||||
e2e-remove-label:
|
||||
if: ${{ always() && contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests') }}
|
||||
|
Reference in New Issue
Block a user