Run desktop regression tests #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run desktop regression tests | |
on: | |
workflow_dispatch: | |
inputs: | |
APPIMAGE_QA_URL: | |
description: 'AppImage-QA url from Github artefacts' | |
required: true | |
type: string | |
default: https://github.com/session-foundation/session-desktop/actions/runs/15481004324/artifacts/3272572417 | |
PLAYWRIGHT_REPEAT_COUNT: | |
description: 'Repeats of each tests (0 to only run each once)' | |
required: true | |
type: number | |
default: 0 | |
PLAYWRIGHT_RETRIES_COUNT: | |
description: 'Retries of each tests (0 to only run each once, 1 to run another attempt)' | |
required: true | |
type: number | |
default: 0 | |
PLAYWRIGHT_WORKERS_COUNT: | |
description: 'Playwright workers to start' | |
required: true | |
type: number | |
default: 8 | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
desktop-regression: | |
name: Desktop Regression Tests | |
runs-on: [self-hosted, Linux, X64, qa-desktop] | |
container: | |
image: mcr.microsoft.com/playwright:v1.51.0-noble | |
options: --cpus 16 | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
PLAYWRIGHT_REPEAT_COUNT: ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }} | |
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }} | |
PLAYWRIGHT_WORKERS_COUNT: ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }} | |
steps: | |
- name: Runner Details | |
run: | | |
echo "APPIMAGE_QA_URL ${{ github.event.inputs.APPIMAGE_QA_URL }}" | |
echo "PLAYWRIGHT_REPEAT_COUNT ${{ github.event.inputs.PLAYWRIGHT_REPEAT_COUNT }}" | |
echo "PLAYWRIGHT_RETRIES_COUNT ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}" | |
echo "PLAYWRIGHT_WORKERS_COUNT ${{ github.event.inputs.PLAYWRIGHT_WORKERS_COUNT }}" | |
- name: Install git lfs | |
run: | | |
sudo apt-get install git-lfs | |
git lfs install | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: 'Download prebuilt session-desktop' | |
run: | | |
curl -L \ | |
-H "Authorization: token $GH_TOKEN" \ | |
-H "Accept: application/vnd.github+json" \ | |
-o artifact.zip \ | |
"https://api.github.com/repos/$REPO/actions/artifacts/$artifact_id/zip" | |
unzip artifact.zip -d ./downloaded-artifact | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install yarn | |
run: | | |
npm install -g yarn | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- name: Build the Desktop tests | |
run: | | |
cd $GITHUB_WORKSPACE | |
yarn tsc | |
- name: Run the Desktop tests | |
run: | | |
cd $GITHUB_WORKSPACE/playwright | |
SESSION_DESKTOP_ROOT=$GITHUB_WORKSPACE/desktop nice ionice xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' yarn test | |
# DEBUG="pw:*" | |
- name: Kill all running electron app | |
if: always() | |
continue-on-error: true # just so we don't fail | |
shell: bash | |
run: | | |
killall electron; |