Files
mattermostest/.github/actions/install-os-dependencies/action.yaml
2025-03-26 18:13:10 +00:00

57 lines
1.9 KiB
YAML

name: 'Install OS Dependencies'
description: 'Installs OS-specific dependencies for E2E tests'
inputs:
os:
description: 'Operating system (Linux, macOS, Windows)'
required: true
runs:
using: "composite"
steps:
- name: Install Linux Dependencies
if: inputs.os == 'Linux'
shell: bash
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 \
xvfb \
libgtk-3-0 \
libnss3 \
libxss1 \
libasound2
- name: Install macOS Dependencies
if: inputs.os == 'macOS'
shell: bash
run: |
brew install nss
jq '.mac.target=["zip"]' electron-builder.json | \
jq '.mac.gatekeeperAssess=false' > /tmp/electron-builder.json && \
cp /tmp/electron-builder.json .
- name: Install Windows Dependencies
if: inputs.os == 'Windows'
shell: bash
run: |
choco install yq --version 4.15.1 -y
choco install vcredist-all -y
npm i -g node-gyp
ELECTRON_VERSION=$(jq -r .devDependencies.electron package.json)
node-gyp install
node-gyp install --devdir="C:\Users\runneradmin\.electron-gyp" --target=$ELECTRON_VERSION --dist-url="https://electronjs.org/headers"
node-gyp install --devdir="C:\Users\runneradmin\.electron-gyp" --target=$ELECTRON_VERSION --dist-url="https://electronjs.org/headers" --arch arm64
npm install mochawesome-report-generator