Skip to content

Bump io.github.shafthq:SHAFT_ENGINE from 8.1.20240224 to 8.2.20240523 #21

Bump io.github.shafthq:SHAFT_ENGINE from 8.1.20240224 to 8.2.20240523

Bump io.github.shafthq:SHAFT_ENGINE from 8.1.20240224 to 8.2.20240523 #21

Workflow file for this run

name: E2E Tests Custom
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
workflow_dispatch:
inputs:
targetBrowser:
description: 'Choose Target Browser'
default: 'chrome'
type: choice
options:
- firefox
- chrome
- microsoftedge
jobs:
Custom_Linux_Grid:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Set up Native Selenium Grid
run: |
if [ '${{ github.event.inputs.targetBrowser }}' == 'firefox' ]; then
docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=0 --scale firefox=4 -d --force-recreate
elif [ '${{ github.event.inputs.targetBrowser }}' == 'chrome' ]; then
docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d --force-recreate
elif [ '${{ github.event.inputs.targetBrowser }}' == 'microsoftedge' ]; then
docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=4 --scale firefox=0 -d --force-recreate
else
echo "Browser not supported"
fi
- name: Log Browser Version
run: |
if [ '${{ github.event.inputs.targetBrowser }}' == 'firefox' ]; then
BROWSER_VERSION=$(docker run --rm selenium/node-firefox:4.16.1-20231212 firefox --version | awk "{print \$3}")
echo "Firefox Browser Version: $BROWSER_VERSION"
elif [ '${{ github.event.inputs.targetBrowser }}' == 'chrome' ]; then
BROWSER_VERSION=$(docker run --rm selenium/node-chrome:120.0 google-chrome-stable --version | awk "{print \$3}")
echo "Google Chrome Browser Version: $BROWSER_VERSION"
elif [ '${{ github.event.inputs.targetBrowser }}' == 'microsoftedge' ]; then
BROWSER_VERSION=$(docker run --rm selenium/node-edge:4.16.1-20231212 microsoft-edge --version | awk "{print \$3}")
echo "Microsoft Edge Browser Version: $BROWSER_VERSION"
else
echo "Browser not supported"
fi
- name: Set Up Java JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Check running containers
run: docker ps
- name: Run tests
continue-on-error: true
run: |
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="LINUX" -DtargetBrowserName="${{ github.event.inputs.targetBrowser }}" -DheadlessExecution="true" -DscreenshotParams_whenToTakeAScreenshot="FailuresOnly" -DcreateAnimatedGif="true" -DgenerateAllureReportArchive="true"
- name: Upload Allure Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Custom_Linux_Grid_Allure
path: "generatedReport_*.zip"
- name: Upload Allure Report HTML as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Custom_Linux_Grid_Allure_HTML
path: "allure-report/index.html"