From 9120dc1274a021761b0117e465a7d5e05e19e7b5 Mon Sep 17 00:00:00 2001 From: Jeremy Maitin-Shepard Date: Mon, 28 Nov 2022 15:25:42 -0800 Subject: [PATCH] chore(github-actions): use non-snap version of firefox Per https://github.com/karma-runner/karma-firefox-launcher/issues/183, the snap version of firefox does not work with Karma. --- .github/workflows/build.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db7d8dd6e..fe201b58e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,18 @@ jobs: run: npm run build-module --no-typecheck - name: Build Python client bundles run: npm run build-python --no-typecheck - - run: sudo apt-get install firefox xvfb + - run: | + sudo add-apt-repository ppa:mozillateam/ppa + echo ' + Package: * + Pin: release o=LP-PPA-mozillateam + Pin-Priority: 1001 + + Package: firefox + Pin: version 1:1snap1-0ubuntu2 + Pin-Priority: -1 + ' | sudo tee /etc/apt/preferences.d/mozilla-firefox + sudo apt-get install firefox xvfb if: startsWith(runner.os, 'Linux') - name: Run JavaScript tests (including WebGL) # Swiftshader, used by Chrome headless, crashes when running Neuroglancer @@ -99,8 +110,19 @@ jobs: - run: npm run build-python -- --no-typecheck - name: Install Python packaging/test tools run: python -m pip install --upgrade pip tox wheel numpy pytest - - run: sudo apt-get install -y firefox xvfb - if: ${{ startsWith(runner.os, 'Linux') }} + - run: | + sudo add-apt-repository ppa:mozillateam/ppa + echo ' + Package: * + Pin: release o=LP-PPA-mozillateam + Pin-Priority: 1001 + + Package: firefox + Pin: version 1:1snap1-0ubuntu2 + Pin-Priority: -1 + ' | sudo tee /etc/apt/preferences.d/mozilla-firefox + sudo apt-get install firefox xvfb + if: startsWith(runner.os, 'Linux') - name: Test with tox run: tox -e ${{ fromJSON('["skip-browser-tests","firefox-xvfb"]')[runner.os == 'Linux'] }} env: