From dd72d20d9adf4fe3e05a7cdae9d8095df5c35a39 Mon Sep 17 00:00:00 2001 From: clarmso Date: Tue, 7 Jan 2020 20:13:16 -0500 Subject: [PATCH 1/7] Install newest Chrome browser when needed --- circle.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/circle.yml b/circle.yml index c371cf1650ed..3bfe0796fba5 100644 --- a/circle.yml +++ b/circle.yml @@ -60,12 +60,22 @@ commands: browser: description: browser shortname to target type: string + default: electron chunk: description: e2e test chunk number type: integer steps: - attach_workspace: at: ~/ + - unless: + condition: <> + steps: + - run: + command: | + apt update ; + apt install google-chrome-stable -y ; + which google-chrome ; + google-chrome --version ; - run: command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >> working_directory: packages/server @@ -430,56 +440,48 @@ jobs: <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 1 "server-e2e-tests-electron-2": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 2 "server-e2e-tests-electron-3": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 3 "server-e2e-tests-electron-4": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 4 "server-e2e-tests-electron-5": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 5 "server-e2e-tests-electron-6": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 6 "server-e2e-tests-electron-7": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 7 "server-e2e-tests-electron-8": <<: *defaults steps: - run-e2e-tests: - browser: electron chunk: 8 "driver-integration-tests-chrome": @@ -495,6 +497,12 @@ jobs: - run: command: $(npm bin)/wait-on http://localhost:3500 working_directory: packages/driver + - run: + command: | + apt update ; + apt install google-chrome-stable -y ; + which google-chrome ; + google-chrome --version ; - run: command: | CYPRESS_KONFIG_ENV=production \ From 40f8a830a34790478a22e3f44d918ad3b7d1712d Mon Sep 17 00:00:00 2001 From: clarmso Date: Wed, 8 Jan 2020 01:22:45 -0500 Subject: [PATCH 2/7] Create command for installing Chrome --- circle.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/circle.yml b/circle.yml index 3bfe0796fba5..2472aa79ea8d 100644 --- a/circle.yml +++ b/circle.yml @@ -55,6 +55,14 @@ executors: PLATFORM: mac commands: + install-latest-chrome: + steps: + - run: + command: | + apt update ; + apt install google-chrome-stable -y ; + which google-chrome ; + google-chrome --version run-e2e-tests: parameters: browser: @@ -70,12 +78,7 @@ commands: - unless: condition: <> steps: - - run: - command: | - apt update ; - apt install google-chrome-stable -y ; - which google-chrome ; - google-chrome --version ; + - install-latest-chrome - run: command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >> working_directory: packages/server @@ -490,6 +493,7 @@ jobs: steps: - attach_workspace: at: ~/ + - install-latest-chrome - run: command: npm start background: true @@ -497,12 +501,6 @@ jobs: - run: command: $(npm bin)/wait-on http://localhost:3500 working_directory: packages/driver - - run: - command: | - apt update ; - apt install google-chrome-stable -y ; - which google-chrome ; - google-chrome --version ; - run: command: | CYPRESS_KONFIG_ENV=production \ From b5ee249bcec00ae03b3e7d8830516ca35d757be9 Mon Sep 17 00:00:00 2001 From: clarmso Date: Sun, 26 Jan 2020 16:24:24 -0500 Subject: [PATCH 3/7] Install Chrome without any conditions in run-e2e-tests. Browser is always defined. --- circle.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 2472aa79ea8d..d0210741216d 100644 --- a/circle.yml +++ b/circle.yml @@ -75,10 +75,7 @@ commands: steps: - attach_workspace: at: ~/ - - unless: - condition: <> - steps: - - install-latest-chrome + - install-latest-chrome - run: command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >> working_directory: packages/server From 914a9790f2f5976eb9d9957f24644c1ff5f2d3cd Mon Sep 17 00:00:00 2001 From: clarmso Date: Mon, 27 Jan 2020 00:50:23 -0500 Subject: [PATCH 4/7] Install newest Chrome in e2e tests only if it is needed. --- circle.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index d0210741216d..06b0442046f5 100644 --- a/circle.yml +++ b/circle.yml @@ -68,14 +68,16 @@ commands: browser: description: browser shortname to target type: string - default: electron chunk: description: e2e test chunk number type: integer steps: - attach_workspace: at: ~/ - - install-latest-chrome + - when: + condition: <> + steps: + - install-latest-chrome - run: command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >> working_directory: packages/server @@ -440,48 +442,56 @@ jobs: <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 1 "server-e2e-tests-electron-2": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 2 "server-e2e-tests-electron-3": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 3 "server-e2e-tests-electron-4": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 4 "server-e2e-tests-electron-5": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 5 "server-e2e-tests-electron-6": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 6 "server-e2e-tests-electron-7": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 7 "server-e2e-tests-electron-8": <<: *defaults steps: - run-e2e-tests: + browser: electron chunk: 8 "driver-integration-tests-chrome": From 3443f2872f236a40ac8cc467efd1ac7091e7ff49 Mon Sep 17 00:00:00 2001 From: clarmso Date: Thu, 30 Jan 2020 00:12:34 -0500 Subject: [PATCH 5/7] Add condition to install the latest chrome only for chrome e2e tests --- circle.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/circle.yml b/circle.yml index 06b0442046f5..5f65c8d67cab 100644 --- a/circle.yml +++ b/circle.yml @@ -56,13 +56,23 @@ executors: commands: install-latest-chrome: + parameters: + browser: + description: browser shortname to target + type: string + default: "" steps: - run: command: | - apt update ; - apt install google-chrome-stable -y ; - which google-chrome ; - google-chrome --version + if [ << parameters.browser >> == "chrome" ]; then + echo "Running Chrome tests. Installing latest stable version of Google Chrome." + apt-get update + apt-get install google-chrome-stable -y + echo "Location of Google Chrome Installation: "`which google-chrome` + echo "Google Chrome Version: "`google-chrome --version` + else + echo "Not updating Chrome. Running tests in '<< parameters.browser >>''" + fi run-e2e-tests: parameters: browser: @@ -74,10 +84,8 @@ commands: steps: - attach_workspace: at: ~/ - - when: - condition: <> - steps: - - install-latest-chrome + - install-latest-chrome: + browser: << parameters.browser >> - run: command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >> working_directory: packages/server @@ -500,7 +508,8 @@ jobs: steps: - attach_workspace: at: ~/ - - install-latest-chrome + - install-latest-chrome: + browser: chrome - run: command: npm start background: true From ef870f5e2c6aca3d4a538ed64cb248e05ed41d77 Mon Sep 17 00:00:00 2001 From: clarmso Date: Thu, 30 Jan 2020 00:41:37 -0500 Subject: [PATCH 6/7] Add description to install-latest-chrome. Browser parameter becomes an enum. --- circle.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/circle.yml b/circle.yml index 5f65c8d67cab..913d364604c7 100644 --- a/circle.yml +++ b/circle.yml @@ -56,28 +56,32 @@ executors: commands: install-latest-chrome: + description: Install latest Google Chrome (stable) parameters: browser: + default: "electron" description: browser shortname to target - type: string - default: "" + type: enum + enum: [ "chrome", "electron" ] steps: - run: command: | if [ << parameters.browser >> == "chrome" ]; then - echo "Running Chrome tests. Installing latest stable version of Google Chrome." + echo "**** Running Chrome tests. Installing latest stable version of Google Chrome. ****" apt-get update apt-get install google-chrome-stable -y - echo "Location of Google Chrome Installation: "`which google-chrome` - echo "Google Chrome Version: "`google-chrome --version` + echo "**** Location of Google Chrome Installation: "`which google-chrome`" ****" + echo "**** Google Chrome Version: "`google-chrome --version`" ****" else - echo "Not updating Chrome. Running tests in '<< parameters.browser >>''" + echo "**** Not updating Chrome. Running tests in '<< parameters.browser >>' ****" fi run-e2e-tests: parameters: browser: + default: "electron" description: browser shortname to target - type: string + type: enum + enum: [ "chrome", "electron" ] chunk: description: e2e test chunk number type: integer From a94bcf0084a9e04e202d2bcd1ac9a298f9e84f4b Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Fri, 31 Jan 2020 11:58:05 -0500 Subject: [PATCH 7/7] Update circle.yml - Add a descriptive name to the install step, so the script doesn't get printed out twice - Let `browser` be any string - we have more browsers on the way :smile: --- circle.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 44f05d0b415f..d9c3bd03a593 100644 --- a/circle.yml +++ b/circle.yml @@ -61,10 +61,10 @@ commands: browser: default: "electron" description: browser shortname to target - type: enum - enum: [ "chrome", "electron" ] + type: string steps: - run: + name: Install latest Google Chrome (stable) command: | if [ << parameters.browser >> == "chrome" ]; then echo "**** Running Chrome tests. Installing latest stable version of Google Chrome. ****" @@ -80,8 +80,7 @@ commands: browser: default: "electron" description: browser shortname to target - type: enum - enum: [ "chrome", "electron" ] + type: string chunk: description: e2e test chunk number type: integer