From da32e8e52af84d7ba9adc832c2bc2b4a3b59e2e7 Mon Sep 17 00:00:00 2001 From: Shi <68201193+Shi191099@users.noreply.github.com> Date: Mon, 3 Jul 2023 15:24:58 +0530 Subject: [PATCH 1/5] Create selenium-test.yml --- selenium-test.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 selenium-test.yml diff --git a/selenium-test.yml b/selenium-test.yml new file mode 100644 index 0000000..e7417ae --- /dev/null +++ b/selenium-test.yml @@ -0,0 +1,35 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: openjdk11 + commands: + - echo "Install phase: Installing dependencies..." + - mvn install -DskipTests=true + + pre_build: + commands: + - echo "Pre-build phase: Setting up web driver..." + # Download and configure web driver (e.g., ChromeDriver) + # Replace the following command with the appropriate web driver setup for your project + - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' + - sudo apt-get update -y && sudo apt-get install -y google-chrome-stable + - wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -O version + - wget https://chromedriver.storage.googleapis.com/$(cat version)/chromedriver_linux64.zip + - unzip chromedriver_linux64.zip + - sudo mv chromedriver /usr/local/bin/chromedriver + - sudo chown root:root /usr/local/bin/chromedriver + - sudo chmod +x /usr/local/bin/chromedriver + - export CHROME_BIN=google-chrome-stable + + build: + commands: + - echo "Build phase: Compiling and packaging..." + - mvn package -DskipTests=true + + post_build: + commands: + - echo "Post-build phase: Running Selenium tests..." + - mvn test From 3534f425e79c5e0506bb161cc085532a588e5d65 Mon Sep 17 00:00:00 2001 From: Shi <68201193+Shi191099@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:42:07 +0530 Subject: [PATCH 2/5] Update selenium-test.yml --- selenium-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selenium-test.yml b/selenium-test.yml index e7417ae..e6575a1 100644 --- a/selenium-test.yml +++ b/selenium-test.yml @@ -10,7 +10,7 @@ phases: pre_build: commands: - - echo "Pre-build phase: Setting up web driver..." + - echo "Pre-build phase Setting up web driver..." # Download and configure web driver (e.g., ChromeDriver) # Replace the following command with the appropriate web driver setup for your project - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - From 8c9b553a5d9bdd67dd32266e7ae4f59a435a69ef Mon Sep 17 00:00:00 2001 From: Shi <68201193+Shi191099@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:43:46 +0530 Subject: [PATCH 3/5] Update selenium-test.yml --- selenium-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selenium-test.yml b/selenium-test.yml index e6575a1..3052e32 100644 --- a/selenium-test.yml +++ b/selenium-test.yml @@ -5,7 +5,7 @@ phases: runtime-versions: java: openjdk11 commands: - - echo "Install phase: Installing dependencies..." + - echo "Install phase Installing dependencies..." - mvn install -DskipTests=true pre_build: @@ -26,10 +26,10 @@ phases: build: commands: - - echo "Build phase: Compiling and packaging..." + - echo "Build phase Compiling and packaging..." - mvn package -DskipTests=true post_build: commands: - - echo "Post-build phase: Running Selenium tests..." + - echo "Post-build phase Running Selenium tests..." - mvn test From de989cbacc84d27902082b32a3ed74a17ad8e5b3 Mon Sep 17 00:00:00 2001 From: Shi <68201193+Shi191099@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:45:39 +0530 Subject: [PATCH 4/5] Update selenium-test.yml --- selenium-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selenium-test.yml b/selenium-test.yml index 3052e32..8a679be 100644 --- a/selenium-test.yml +++ b/selenium-test.yml @@ -3,7 +3,7 @@ version: 0.2 phases: install: runtime-versions: - java: openjdk11 + java: corretto11 commands: - echo "Install phase Installing dependencies..." - mvn install -DskipTests=true From 380bcdf60304db309eeb722a985456a5b358040b Mon Sep 17 00:00:00 2001 From: Shi <68201193+Shi191099@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:56:24 +0530 Subject: [PATCH 5/5] Update selenium-test.yml --- selenium-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selenium-test.yml b/selenium-test.yml index 8a679be..447ef8a 100644 --- a/selenium-test.yml +++ b/selenium-test.yml @@ -33,3 +33,7 @@ phases: commands: - echo "Post-build phase Running Selenium tests..." - mvn test +artifacts: + files: + - "**/*.war" + discard-paths: yes