E2E Tests #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ master ] | |
schedule: | |
- cron: '00 1 * * *' | |
workflow_dispatch: | |
jobs: | |
GUI_Web: | |
name: Run GUI Web Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, windows-latest, macOS-12 ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Set up Native Selenium Grid | |
if: runner.os == 'Linux' | |
run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Check running containers | |
if: runner.os == 'Linux' | |
run: docker ps | |
- name: Run tests on Linux/MacOS | |
if: runner.os != 'Windows' | |
continue-on-error: true | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mvn test -DexecutionAddress="local" -DheadlessExecution="true" -DtargetOperatingSystem="LINUX" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome" -DcreateAnimatedGif="true" -DgenerateAllureReportArchive="true" | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
mvn test -DexecutionAddress="browserstack" -DtargetOperatingSystem="MAC" -DmaximumPerformanceMode="1" -DtargetBrowserName="Safari" "-DbrowserStack.os=OS X" "-DbrowserStack.osVersion=Monterey" "-DbrowserStack.browserVersion=15.3" -DcreateAnimatedGif="true" -DgenerateAllureReportArchive="true" | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Run tests on Windows | |
if: runner.os == 'Windows' | |
continue-on-error: true | |
run: | | |
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DmaximumPerformanceMode="2" -DtargetBrowserName="MozillaFirefox" -DcreateAnimatedGif="true" -DgenerateAllureReportArchive="true" | |
- name: Upload Allure Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Allure Report | |
path: "generatedReport_*.zip" | |
- name: Upload Extent Report as Pipeline Artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} - Desktop Browsers Tests Extent Report | |
path: "extent-reports/ExtentReports_*.html" |