From a9c11313e98bdc50c661058fa9763ff76706c1d7 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 07:53:16 +0200 Subject: [PATCH 01/17] test getting chrome --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5717a7e1c..d900035913 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,7 @@ jobs: working_directory: ~/remix-project steps: - checkout + - run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - restore_cache: keys: - v1-deps-{{ checksum "yarn.lock" }} From 00e12ca8fe17ee90d04344c6dbe818ec9fa0607e Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 09:36:38 +0200 Subject: [PATCH 02/17] add command --- .circleci/config.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d900035913..d93e184c6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: working_directory: ~/remix-project steps: - checkout - - run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + - install-chrome-custom-linux - restore_cache: keys: - v1-deps-{{ checksum "yarn.lock" }} @@ -398,3 +398,30 @@ commands: echo Done chromedriver -v + install-chrome-custom-linux: + description: Custom script to install chrome with better version support for linux + steps: + - run: + name: install-custom-linux + command: | + CHROME_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chrome[] | select(.platform == "linux64") | .url' | tr -d '"') + echo $CHROME_URL + ZIPFILEPATH="/tmp/chrome.zip" + echo "Downloading from $CHROME_URL" + curl -f --silent $CHROME_URL > "$ZIPFILEPATH" + + BINFILEPATH="$HOME/bin/chrome-linux" + echo "Extracting to $BINFILEPATH" + unzip -p "$ZIPFILEPATH" chrome-linux64/chrome > "$BINFILEPATH" + + echo Setting execute flag + chmod +x "$BINFILEPATH" + + echo Updating symlink + ln -nfs "$BINFILEPATH" ~/bin/chrome + + echo Removing ZIP file + rm "$ZIPFILEPATH" + + echo Done + chrome -v \ No newline at end of file From 2d6ad692f14a7f205cbfa6e77f58ea73cf790de8 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 09:43:56 +0200 Subject: [PATCH 03/17] version command --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d93e184c6b..43c5d4b288 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,10 +418,10 @@ commands: chmod +x "$BINFILEPATH" echo Updating symlink - ln -nfs "$BINFILEPATH" ~/bin/chrome + ln -nfs "$BINFILEPATH" ~/bin/google-chrome echo Removing ZIP file rm "$ZIPFILEPATH" echo Done - chrome -v \ No newline at end of file + google-chrome --version \ No newline at end of file From 12530e49683d771b5d320670bd794bcb3c9ef1a3 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 09:45:35 +0200 Subject: [PATCH 04/17] test install --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 43c5d4b288..20680b0088 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -144,9 +144,10 @@ jobs: steps: - browser-tools/install-browser-tools: install-firefox: false - install-chrome: true + install-chrome: false install-chromedriver: false install-geckodriver: false + - install-chrome-custom-linux - install-chromedriver-custom-linux - run: google-chrome --version - run: chromedriver --version @@ -402,7 +403,7 @@ commands: description: Custom script to install chrome with better version support for linux steps: - run: - name: install-custom-linux + name: install-custom-chrome-linux command: | CHROME_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chrome[] | select(.platform == "linux64") | .url' | tr -d '"') echo $CHROME_URL From c6713799331bc29bc86e273a5ff761f67586d441 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 09:56:11 +0200 Subject: [PATCH 05/17] settings --- apps/remix-ide-e2e/nightwatch.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/nightwatch.ts b/apps/remix-ide-e2e/nightwatch.ts index 7e05269897..ea861afa93 100644 --- a/apps/remix-ide-e2e/nightwatch.ts +++ b/apps/remix-ide-e2e/nightwatch.ts @@ -35,6 +35,7 @@ module.exports = { '--no-sandbox', '--headless', '--verbose', + '--disable-dev-shm-usage', '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' ] } From 383f33b27db0908875668dfa2f21eb9c23f36acc Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 10:13:29 +0200 Subject: [PATCH 06/17] add tools --- .circleci/config.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 20680b0088..5c63f341c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,9 +14,14 @@ jobs: resource_class: xlarge working_directory: ~/remix-project - steps: + steps: + - browser-tools/install-browser-tools: + install-firefox: false + install-chrome: true + install-chromedriver: false + install-geckodriver: false - checkout - - install-chrome-custom-linux + - restore_cache: keys: - v1-deps-{{ checksum "yarn.lock" }} From 71e8eccb6a10ec04a595dd5c96f32c498c77f431 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 10:14:57 +0200 Subject: [PATCH 07/17] steps --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c63f341c3..307db7bada 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,10 +14,10 @@ jobs: resource_class: xlarge working_directory: ~/remix-project - steps: + steps: - browser-tools/install-browser-tools: install-firefox: false - install-chrome: true + install-chrome: false install-chromedriver: false install-geckodriver: false - checkout From 5f6359e8e0d7ade9d05b21e49363a9c85dfe21dc Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 10:16:51 +0200 Subject: [PATCH 08/17] sintall --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 307db7bada..5beb140025 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: steps: - browser-tools/install-browser-tools: install-firefox: false - install-chrome: false + install-chrome: true install-chromedriver: false install-geckodriver: false - checkout From f73387f23ba71f0f1975743ca0376f623592bbcb Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 12:35:45 +0200 Subject: [PATCH 09/17] reset --- .circleci/config.yml | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5beb140025..d5717a7e1c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,13 +15,7 @@ jobs: xlarge working_directory: ~/remix-project steps: - - browser-tools/install-browser-tools: - install-firefox: false - install-chrome: true - install-chromedriver: false - install-geckodriver: false - checkout - - restore_cache: keys: - v1-deps-{{ checksum "yarn.lock" }} @@ -149,10 +143,9 @@ jobs: steps: - browser-tools/install-browser-tools: install-firefox: false - install-chrome: false + install-chrome: true install-chromedriver: false install-geckodriver: false - - install-chrome-custom-linux - install-chromedriver-custom-linux - run: google-chrome --version - run: chromedriver --version @@ -404,30 +397,3 @@ commands: echo Done chromedriver -v - install-chrome-custom-linux: - description: Custom script to install chrome with better version support for linux - steps: - - run: - name: install-custom-chrome-linux - command: | - CHROME_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chrome[] | select(.platform == "linux64") | .url' | tr -d '"') - echo $CHROME_URL - ZIPFILEPATH="/tmp/chrome.zip" - echo "Downloading from $CHROME_URL" - curl -f --silent $CHROME_URL > "$ZIPFILEPATH" - - BINFILEPATH="$HOME/bin/chrome-linux" - echo "Extracting to $BINFILEPATH" - unzip -p "$ZIPFILEPATH" chrome-linux64/chrome > "$BINFILEPATH" - - echo Setting execute flag - chmod +x "$BINFILEPATH" - - echo Updating symlink - ln -nfs "$BINFILEPATH" ~/bin/google-chrome - - echo Removing ZIP file - rm "$ZIPFILEPATH" - - echo Done - google-chrome --version \ No newline at end of file From 026cf01e3e2b41e1ea4b8abd9ea9d8efa7c2e411 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 12:56:21 +0200 Subject: [PATCH 10/17] select version --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5717a7e1c..6aeed3915a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -377,6 +377,7 @@ commands: name: install-chromedriver-custom-linux command: | CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') + CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' | jq '.versions[] | select(.version | startswith("116")) | .downloads.chrome[] | select(.platform == "linux64") | .url' | tail -n1 | tr -d '"') echo $CHROMEDRIVER_URL ZIPFILEPATH="/tmp/chromedriver.zip" echo "Downloading from $CHROMEDRIVER_URL" From 6837de3fde4d55376be7accf598bce0a8fb87d66 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:05:50 +0200 Subject: [PATCH 11/17] version --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6aeed3915a..fdcc26cbcb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -376,8 +376,10 @@ commands: - run: name: install-chromedriver-custom-linux command: | + google-chrome --version > version.txt + VERSION=$(grep -Eo '[0-9]+\.' < version.txt | head -1) CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') - CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' | jq '.versions[] | select(.version | startswith("116")) | .downloads.chrome[] | select(.platform == "linux64") | .url' | tail -n1 | tr -d '"') + CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' | jq --arg v "$VERSION" '.versions[] | select(.version | startswith($v)) | .downloads.chromedriver[] | select(.platform == "linux64") | .url' | tail -n1 | tr -d '"') echo $CHROMEDRIVER_URL ZIPFILEPATH="/tmp/chromedriver.zip" echo "Downloading from $CHROMEDRIVER_URL" From aa05998aa9989f4afdc50ee93bac2617a61cb166 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:15:35 +0200 Subject: [PATCH 12/17] rm file --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fdcc26cbcb..5433a7cf63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,7 +378,7 @@ commands: command: | google-chrome --version > version.txt VERSION=$(grep -Eo '[0-9]+\.' < version.txt | head -1) - CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') + # CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json' | jq '.channels.Stable.downloads.chromedriver[] | select(.platform == "linux64") | .url' | tr -d '"') CHROMEDRIVER_URL=$(curl -s 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json' | jq --arg v "$VERSION" '.versions[] | select(.version | startswith($v)) | .downloads.chromedriver[] | select(.platform == "linux64") | .url' | tail -n1 | tr -d '"') echo $CHROMEDRIVER_URL ZIPFILEPATH="/tmp/chromedriver.zip" @@ -397,6 +397,7 @@ commands: echo Removing ZIP file rm "$ZIPFILEPATH" + rm version.txt echo Done chromedriver -v From 28564cf21ca9ba52f95c08cd937b102211404082 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:37:09 +0200 Subject: [PATCH 13/17] selenium install --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5433a7cf63..da0aabf8eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,7 +214,7 @@ jobs: - run: unzip ./persist/dist.zip - run: unzip ./persist/plugin-<< parameters.plugin >>.zip - run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules - - run: yarn run selenium-install || yarn run selenium-install + - run: yarn selenium-standalone install --singleDriverInstall=chrome --drivers.chrome.version=116.0.5845.96 - run: name: Start Selenium command: yarn run selenium From 0b1897294db4e9e5f4edee98c2474c8d3d84cd2a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:46:03 +0200 Subject: [PATCH 14/17] copy the driver --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da0aabf8eb..8125fa8f92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,7 +214,8 @@ jobs: - run: unzip ./persist/dist.zip - run: unzip ./persist/plugin-<< parameters.plugin >>.zip - run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules - - run: yarn selenium-standalone install --singleDriverInstall=chrome --drivers.chrome.version=116.0.5845.96 + - run: yarn run selenium-install || yarn run selenium-install + - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium command: yarn run selenium From 61c589382917d4a301fad8ad59bd88621af62b80 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:51:24 +0200 Subject: [PATCH 15/17] cp driver --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8125fa8f92..d5eaf987e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -169,6 +169,7 @@ jobs: - run: ls -la ./dist/apps/remix-ide/assets/js - run: yarn run selenium-install || yarn run selenium-install + - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium command: yarn run selenium From 2e6e27a3385c1e621772669b8ead2c4514590e9a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 16:53:46 +0200 Subject: [PATCH 16/17] config --- apps/remix-ide-e2e/nightwatch.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide-e2e/nightwatch.ts b/apps/remix-ide-e2e/nightwatch.ts index ea861afa93..7e05269897 100644 --- a/apps/remix-ide-e2e/nightwatch.ts +++ b/apps/remix-ide-e2e/nightwatch.ts @@ -35,7 +35,6 @@ module.exports = { '--no-sandbox', '--headless', '--verbose', - '--disable-dev-shm-usage', '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' ] } From 8c8dad515e3a0c8da0e23bd83d200ff8d23b1f64 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 15 Sep 2023 17:00:36 +0200 Subject: [PATCH 17/17] condition --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5eaf987e1..7f101ed684 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -169,7 +169,11 @@ jobs: - run: ls -la ./dist/apps/remix-ide/assets/js - run: yarn run selenium-install || yarn run selenium-install - - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ + - when: + condition: + equal: [ "chrome", << parameters.browser >> ] + steps: + - run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/ - run: name: Start Selenium command: yarn run selenium