Fix Chrome for Karma
This commit is contained in:
parent
c63c6fce70
commit
bdc94f3847
4 changed files with 24 additions and 7 deletions
|
@ -21,22 +21,38 @@ steps:
|
||||||
|
|
||||||
- label: ":karma: Tests"
|
- label: ":karma: Tests"
|
||||||
command:
|
command:
|
||||||
|
# Install chrome
|
||||||
|
- "wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -"
|
||||||
|
- "sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list'"
|
||||||
|
- "apt-get update"
|
||||||
|
- "apt-get install -y google-chrome-stable"
|
||||||
|
# Run tests
|
||||||
# TODO: Remove hacky chmod for BuildKite
|
# TODO: Remove hacky chmod for BuildKite
|
||||||
- "chmod +x ./scripts/ci/*.sh"
|
- "chmod +x ./scripts/ci/*.sh"
|
||||||
- "chmod +x ./scripts/*"
|
- "chmod +x ./scripts/*"
|
||||||
- "./scripts/ci/install-deps.sh"
|
- "./scripts/ci/install-deps.sh"
|
||||||
- "./scripts/ci/unit-tests.sh"
|
- "./scripts/ci/unit-tests.sh"
|
||||||
|
env:
|
||||||
|
CHROME_BIN: "/usr/bin/google-chrome-stable"
|
||||||
plugins:
|
plugins:
|
||||||
- docker#v3.0.1:
|
- docker#v3.0.1:
|
||||||
image: "node:10"
|
image: "node:10"
|
||||||
|
|
||||||
- label: "🔧 Riot Tests"
|
- label: "🔧 Riot Tests"
|
||||||
command:
|
command:
|
||||||
|
# Install chrome
|
||||||
|
- "wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -"
|
||||||
|
- "sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list'"
|
||||||
|
- "apt-get update"
|
||||||
|
- "apt-get install -y google-chrome-stable"
|
||||||
|
# Run tests
|
||||||
# TODO: Remove hacky chmod for BuildKite
|
# TODO: Remove hacky chmod for BuildKite
|
||||||
- "chmod +x ./scripts/ci/*.sh"
|
- "chmod +x ./scripts/ci/*.sh"
|
||||||
- "chmod +x ./scripts/*"
|
- "chmod +x ./scripts/*"
|
||||||
- "./scripts/ci/install-deps.sh"
|
- "./scripts/ci/install-deps.sh"
|
||||||
- "./scripts/ci/riot-unit-tests.sh"
|
- "./scripts/ci/riot-unit-tests.sh"
|
||||||
|
env:
|
||||||
|
CHROME_BIN: "/usr/bin/google-chrome-stable"
|
||||||
plugins:
|
plugins:
|
||||||
- docker#v3.0.1:
|
- docker#v3.0.1:
|
||||||
image: "node:10"
|
image: "node:10"
|
||||||
|
|
|
@ -135,9 +135,10 @@ module.exports = function (config) {
|
||||||
],
|
],
|
||||||
|
|
||||||
customLaunchers: {
|
customLaunchers: {
|
||||||
'ChromeHeadless': {
|
'VectorChromeHeadless': {
|
||||||
base: 'Chrome',
|
base: 'Chrome',
|
||||||
flags: [
|
flags: [
|
||||||
|
'--no-sandbox',
|
||||||
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
|
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
|
||||||
'--headless',
|
'--headless',
|
||||||
'--disable-gpu',
|
'--disable-gpu',
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
"lintwithexclusions": "eslint --max-warnings 0 --ignore-path .eslintignore.errorfiles src test",
|
"lintwithexclusions": "eslint --max-warnings 0 --ignore-path .eslintignore.errorfiles src test",
|
||||||
"clean": "rimraf lib",
|
"clean": "rimraf lib",
|
||||||
"prepare": "yarn clean && yarn build && git rev-parse HEAD > git-revision.txt",
|
"prepare": "yarn clean && yarn build && git rev-parse HEAD > git-revision.txt",
|
||||||
"test": "karma start --single-run=true --browsers ChromeHeadless",
|
"test": "karma start --single-run=true --browsers VectorChromeHeadless",
|
||||||
"test-multi": "karma start"
|
"test-multi": "karma start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
"flow-parser": "^0.57.3",
|
"flow-parser": "^0.57.3",
|
||||||
"jest-mock": "^23.2.0",
|
"jest-mock": "^23.2.0",
|
||||||
"karma": "^4.0.1",
|
"karma": "^4.0.1",
|
||||||
"karma-chrome-launcher": "^0.2.3",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-cli": "^1.0.1",
|
||||||
"karma-junit-reporter": "^2.0.0",
|
"karma-junit-reporter": "^2.0.0",
|
||||||
"karma-logcapture-reporter": "0.0.1",
|
"karma-logcapture-reporter": "0.0.1",
|
||||||
|
|
|
@ -4065,10 +4065,10 @@ just-extend@^4.0.2:
|
||||||
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.0.2.tgz#f3f47f7dfca0f989c55410a7ebc8854b07108afc"
|
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.0.2.tgz#f3f47f7dfca0f989c55410a7ebc8854b07108afc"
|
||||||
integrity sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==
|
integrity sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==
|
||||||
|
|
||||||
karma-chrome-launcher@^0.2.3:
|
karma-chrome-launcher@^2.2.0:
|
||||||
version "0.2.3"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-0.2.3.tgz#4c6d700d163a9d34c618efd87918be49e7a4a8c9"
|
resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf"
|
||||||
integrity sha1-TG1wDRY6nTTGGO/YeRi+SeekqMk=
|
integrity sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==
|
||||||
dependencies:
|
dependencies:
|
||||||
fs-access "^1.0.0"
|
fs-access "^1.0.0"
|
||||||
which "^1.2.1"
|
which "^1.2.1"
|
||||||
|
|
Loading…
Reference in a new issue