From b6cdaa859718c3f18ecb9152c9ca20ef83922013 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 13 Mar 2019 18:25:06 -0600 Subject: [PATCH 1/7] Add a basic BuildKite :pipeline: --- .buildkite/pipeline.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .buildkite/pipeline.yaml diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml new file mode 100644 index 0000000000..195e324860 --- /dev/null +++ b/.buildkite/pipeline.yaml @@ -0,0 +1,21 @@ +steps: + - label: ":eslint: Lint" + command: + - "./scripts/fetch-develop.deps.sh --depth 1" + - "yarn install" + - "yarn lint" + plugins: + - docker#v3.0.1: + image: "node:10" + + - label: ":karma: Tests" + command: + #- "sudo apt-get install git" + - "./scripts/fetch-develop.deps.sh --depth 1" + - "yarn install" + - "yarn test" + plugins: + - docker#v3.0.1: + image: "node:10" + #image: "buildkite/puppeteer:v1.11.0" + From 0b4c52c0326e74136bf79bb29c16b13d1cb67d11 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 13 Mar 2019 18:25:17 -0600 Subject: [PATCH 2/7] Remove Travis (CI) We're using BuildKite now --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0047d75246..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -# we need trusty for the chrome addon -dist: trusty - -# we don't need sudo, so can run in a container, which makes startup much -# quicker. -# -# unfortunately we do temporarily require sudo as a workaround for -# https://github.com/travis-ci/travis-ci/issues/8836 -sudo: required - -language: node_js -node_js: - # make sure we work with a range of node versions. - # - # Current status of node versions: https://github.com/nodejs/LTS/ - # Our minimum supported version is Node 10. - - 10 - - 11 -addons: - chrome: stable -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 - - export PATH=$HOME/.yarn/bin:$PATH -install: - # clone the deps with depth 1: we know we will only ever need that one - # commit. - - scripts/fetch-develop.deps.sh --depth 1 && yarn install -script: - - CHROME_BIN='/usr/bin/google-chrome-stable' yarn test - - yarn lint From f6d4c6a5a361ddec5d4a808dace243033d35b3bb Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 13 Mar 2019 18:30:45 -0600 Subject: [PATCH 3/7] Lint doesn't need develop deps --- .buildkite/pipeline.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 195e324860..8d0e7068ea 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -1,7 +1,6 @@ steps: - label: ":eslint: Lint" command: - - "./scripts/fetch-develop.deps.sh --depth 1" - "yarn install" - "yarn lint" plugins: From 1fb8b23d4c4cc22e6da91ab8999bb09260cf809e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 13 Mar 2019 19:46:52 -0600 Subject: [PATCH 4/7] Set up BuildKite for Chrome --- .buildkite/pipeline.yaml | 11 ++++++++--- karma.conf.js | 4 ++-- package.json | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 8d0e7068ea..9ccd4abf3b 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -9,12 +9,17 @@ steps: - label: ":karma: Tests" command: - #- "sudo apt-get install git" + # 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 - "./scripts/fetch-develop.deps.sh --depth 1" - "yarn install" - "yarn test" + env: + CHROME_BIN: "/usr/bin/google-chrome-stable" plugins: - docker#v3.0.1: image: "node:10" - #image: "buildkite/puppeteer:v1.11.0" - diff --git a/karma.conf.js b/karma.conf.js index 4cb9a72956..610541a566 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -138,10 +138,10 @@ module.exports = function (config) { ], customLaunchers: { - 'ChromeHeadless': { + 'VectorChromeHeadless': { base: 'Chrome', flags: [ - // '--no-sandbox', + '--no-sandbox', // See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md '--headless', '--disable-gpu', diff --git a/package.json b/package.json index e2af18b57b..0083244c86 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "lintall": "eslint src/ test/", "clean": "rimraf lib webapp electron_app/dist", "prepare": "yarn clean && yarn build:compile", - "test": "karma start --single-run=true --autoWatch=false --browsers ChromeHeadless", + "test": "karma start --single-run=true --autoWatch=false --browsers VectorChromeHeadless", "test-multi": "karma start" }, "dependencies": { @@ -117,7 +117,7 @@ "html-webpack-plugin": "^3.2.0", "json-loader": "^0.5.3", "karma": "^3.1.2", - "karma-chrome-launcher": "^0.2.3", + "karma-chrome-launcher": "^2.2.0", "karma-cli": "^1.0.1", "karma-junit-reporter": "^2.0.0", "karma-logcapture-reporter": "0.0.1", diff --git a/yarn.lock b/yarn.lock index 55e137cf2c..d77298aa82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5336,10 +5336,10 @@ jsx-ast-utils@^2.0.1: dependencies: array-includes "^3.0.3" -karma-chrome-launcher@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-0.2.3.tgz#4c6d700d163a9d34c618efd87918be49e7a4a8c9" - integrity sha1-TG1wDRY6nTTGGO/YeRi+SeekqMk= +karma-chrome-launcher@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" + integrity sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w== dependencies: fs-access "^1.0.0" which "^1.2.1" From ef6313fbb46e94b80764ef129c443456a705b7ef Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 13 Mar 2019 22:23:28 -0600 Subject: [PATCH 5/7] Use the right CI branch --- .buildkite/pipeline.yaml | 1 + scripts/fetch-develop.deps.sh | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 9ccd4abf3b..55e65b0525 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -23,3 +23,4 @@ steps: plugins: - docker#v3.0.1: image: "node:10" + propagate-environment: true diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh index 7fbb76f4ab..5c9c7848ed 100755 --- a/scripts/fetch-develop.deps.sh +++ b/scripts/fetch-develop.deps.sh @@ -40,9 +40,8 @@ function dodep() { # Try the PR author's branch in case it exists on the deps as well. # Try the target branch of the push or PR. # Use the default branch as the last resort. - if [[ "$TRAVIS" == true ]]; then - clone $org $repo $TRAVIS_PULL_REQUEST_BRANCH || - clone $org $repo $TRAVIS_BRANCH || + if [[ "$BUILDKITE" == true ]]; then + clone $org $repo $BUILDKITE_BRANCH || clone $org $repo $defbranch || return $? else From bccdd608895629bd77ae472ed24700630b59e8b3 Mon Sep 17 00:00:00 2001 From: Tom Lant Date: Fri, 15 Mar 2019 14:24:45 +0000 Subject: [PATCH 6/7] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../user-interface-or-usability-bug-report.md | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 687e45d496..ffca51c6d7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: '' +labels: bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md b/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md new file mode 100644 index 0000000000..df9cfe4f2e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/user-interface-or-usability-bug-report.md @@ -0,0 +1,57 @@ +--- +name: User Interface or Usability Bug report +about: Please include screenshots in UI/UX bug reports +title: '' +labels: '' +assignees: '' + +--- + + + + + + + +### Description + +Describe here the problem that you are experiencing, or the feature you are requesting. + +### Steps to reproduce + +- For bugs, list the steps +- that reproduce the bug +- using hyphens as bullet points + +Describe how what happens differs from what you expected. + +Log: sent/not sent? + + + +### Version information + + + +- **Platform**: web (in-browser) or desktop? + +For the web app: + +- **Browser**: Chrome, Safari, Firefox? which version? +- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc? +- **URL**: riot.im/develop / riot.im/app / somewhere else? If a private server, what version of riot-web? + +For the desktop app: + +- **OS**: Windows, macOS, Ubuntu, Arch Linux, etc? +- **Version**: 1.x.y From df7b61788103456b100f50320be21b255167cf48 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 15 Mar 2019 10:23:43 -0600 Subject: [PATCH 7/7] Fix downstream branch fetching We should be giving the PR the best possible chance at passing the build. --- scripts/fetch-develop.deps.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh index 5c9c7848ed..d824be95bb 100755 --- a/scripts/fetch-develop.deps.sh +++ b/scripts/fetch-develop.deps.sh @@ -42,6 +42,7 @@ function dodep() { # Use the default branch as the last resort. if [[ "$BUILDKITE" == true ]]; then clone $org $repo $BUILDKITE_BRANCH || + clone $org $repo $BUILDKITE_PULL_REQUEST_BASE_BRANCH || clone $org $repo $defbranch || return $? else