Spin server when Tests start (#3316)

This commit is contained in:
yasser khan
2025-03-26 23:43:10 +05:30
committed by GitHub
parent 081d9c5ad5
commit aa4ee31da3
11 changed files with 477 additions and 322 deletions

View File

@@ -0,0 +1,56 @@
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