diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index efed135ee22..0add56bd38c 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -36,10 +36,6 @@ runs: cat < package.json | jq -r '.hostDependencies[][]' - | \ xargs -L1 echo | sed 's/|//g' | xargs -L1 \ sudo apt-get --ignore-missing install || true - # starts the virtual framebuffer as screen 99, this will be referenced in the wdio config for the test to run - Xvfb :99 -ac & - env: - DISPLAY: ':99' - name: Install host dependencies if: runner.os == 'macOS' @@ -58,11 +54,6 @@ runs: # export DEBUG='electron-forge:*,sidecar' # fi - # set DISPLAY to the virtual framebuffer only for Linux - if [[ "${{ runner.os }}" == "Linux" ]]; then - export DISPLAY=":99" - fi - npm ci npm run lint npm run package diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 78ea013a6cf..6b11b9e443b 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -36,7 +36,8 @@ "styled-components": "5.3.6", "sys-class-rgb-led": "3.0.1", "uuid": "9.0.1", - "ws": "^8.16.0" + "ws": "^8.16.0", + "xvfb-maybe": "^0.2.1" }, "devDependencies": { "@balena/lint": "7.2.4", @@ -27492,6 +27493,42 @@ "xterm": "^4.0.0" } }, + "node_modules/xvfb-maybe": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/xvfb-maybe/-/xvfb-maybe-0.2.1.tgz", + "integrity": "sha512-9IyRz3l6Qyhl6LvnGRF5jMPB4oBEepQnuzvVAFTynP6ACLLSevqigICJ9d/+ofl29m2daeaVBChnPYUnaeJ7yA==", + "dependencies": { + "debug": "^2.2.0", + "which": "^1.2.4" + }, + "bin": { + "xvfb-maybe": "src/xvfb-maybe.js" + } + }, + "node_modules/xvfb-maybe/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/xvfb-maybe/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/xvfb-maybe/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/xxhash-addon": { "version": "2.0.1", "hasInstallScript": true, @@ -46102,6 +46139,38 @@ "dev": true, "requires": {} }, + "xvfb-maybe": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/xvfb-maybe/-/xvfb-maybe-0.2.1.tgz", + "integrity": "sha512-9IyRz3l6Qyhl6LvnGRF5jMPB4oBEepQnuzvVAFTynP6ACLLSevqigICJ9d/+ofl29m2daeaVBChnPYUnaeJ7yA==", + "requires": { + "debug": "^2.2.0", + "which": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "xxhash-addon": { "version": "2.0.1" }, diff --git a/package.json b/package.json index 97b429cf6cf..469e513bbc2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "package": "electron-forge package", "start": "electron-forge start", "make": "electron-forge make", - "wdio": "wdio run ./wdio.conf.ts" + "wdio": "xvfb-maybe wdio run ./wdio.conf.ts" }, "husky": { "hooks": { @@ -57,7 +57,8 @@ "styled-components": "5.3.6", "sys-class-rgb-led": "3.0.1", "uuid": "9.0.1", - "ws": "^8.16.0" + "ws": "^8.16.0", + "xvfb-maybe": "^0.2.1" }, "devDependencies": { "@balena/lint": "7.2.4",