From 4dd4c2202df122a49be893fdbe3cd2882bbaf459 Mon Sep 17 00:00:00 2001 From: whatuserever <83753332+whatuserever@users.noreply.github.com> Date: Sun, 9 Feb 2025 09:26:38 +0200 Subject: [PATCH 1/3] Fix: Ubuntu GH test action --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8431cc87..b5cde46b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,6 +24,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 + - name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed + if: ${{ runner.os == 'Linux' }} + run: | + if grep -q "Ubuntu 24" /etc/os-release; then + sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + fi + shell: bash - uses: actions/setup-node@v4 with: cache: 'yarn' From 3cbcfacd721ca0463d2da247c0d2309292bd0fc2 Mon Sep 17 00:00:00 2001 From: whatuserever <83753332+whatuserever@users.noreply.github.com> Date: Mon, 10 Feb 2025 09:39:06 +0000 Subject: [PATCH 2/3] Run tests on ubuntu-22.04 --- .github/workflows/tests.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5cde46b..2616899b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,19 +18,12 @@ jobs: matrix: os: # - windows-latest - - ubuntu-latest + - ubuntu-22.04 # TODO: Use latest when https://github.com/electron/electron/issues/42510 is fixed # - macos-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 - - name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed - if: ${{ runner.os == 'Linux' }} - run: | - if grep -q "Ubuntu 24" /etc/os-release; then - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - fi - shell: bash - uses: actions/setup-node@v4 with: cache: 'yarn' @@ -45,7 +38,7 @@ jobs: # I ran into problems trying to run an electron window in ubuntu due to a missing graphics server. # That's why this special command for Ubuntu is here - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:e2e - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' - run: yarn test:e2e - if: matrix.os != 'ubuntu-latest' + if: matrix.os != 'ubuntu-22.04' From 0c34fce5bcb447a59db85f2aa9fd3ad1c3c82cfc Mon Sep 17 00:00:00 2001 From: Baruch Odem Date: Tue, 11 Feb 2025 07:04:13 +0200 Subject: [PATCH 3/3] startsWith --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2616899b..70a76d74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: # I ran into problems trying to run an electron window in ubuntu due to a missing graphics server. # That's why this special command for Ubuntu is here - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:e2e - if: matrix.os == 'ubuntu-22.04' + if: startsWith(matrix.os, 'ubuntu') - run: yarn test:e2e - if: matrix.os != 'ubuntu-22.04' + if: ${{ !startsWith(matrix.os, 'ubuntu') }}