E2E Tests Custom #17
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 Custom | |
on: | |
workflow_dispatch: | |
inputs: | |
testsPath: | |
description: 'Path to Tests to be Executed' | |
default: '' | |
browsers: | |
description: 'Comma-separated list of browsers to execute tests against (e.g., chrome,firefox,edge)' | |
default: 'all' | |
jobs: | |
preprocess: | |
runs-on: ubuntu-latest | |
outputs: | |
selected: ${{ steps.process.outputs.selected }} | |
steps: | |
- name: Process Browser Input | |
id: process | |
run: | | |
browsers="${{ github.event.inputs.browsers }}" | |
echo "Selected browsers: $browsers" | |
echo "::set-output name=selected::$browsers" | |
E2E_Chrome_Windows_Test: | |
runs-on: windows-latest | |
needs: preprocess | |
if: contains(needs.preprocess.outputs.selected, 'chrome') || contains(needs.preprocess.outputs.selected, 'all') | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Run Tests on Chrome | |
continue-on-error: true | |
run: mvn test -DtargetBrowserName="chrome" -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DheadlessExecution="true" -Dtest="${{ github.event.inputs.testsPath }}" | |
# - name: Generate Allure Report | |
# run: .\allure.bat generate --single-file -o allure-report | |
# - name: Upload Allure Report as Artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: Chrome_Windows_Allure | |
# path: allure-report/* | |
E2E_Firefox_Windows_Test: | |
runs-on: windows-latest | |
needs: preprocess | |
if: contains(needs.preprocess.outputs.selected, 'firefox') || contains(needs.preprocess.outputs.selected, 'all') | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Run Tests on Firefox | |
continue-on-error: true | |
run: mvn test -DtargetBrowserName="firefox" -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DheadlessExecution="true" -Dtest="${{ github.event.inputs.testsPath }}" | |
# - name: Generate Allure Report | |
# run: .\allure.bat generate --single-file -o allure-report | |
# - name: Upload Allure Report as Artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: Firefox_Windows_Allure | |
# path: allure-report/* | |
E2E_Edge_Windows_Test: | |
runs-on: windows-latest | |
needs: preprocess | |
if: contains(needs.preprocess.outputs.selected, 'edge') || contains(needs.preprocess.outputs.selected, 'all') | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Run Tests on Edge | |
continue-on-error: true | |
run: mvn test -DtargetBrowserName="microsoftedge" -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DheadlessExecution="true" -Dtest="${{ github.event.inputs.testsPath }}" | |
# - name: Generate Allure Report | |
# run: .\allure.bat generate --single-file -o allure-report | |
# - name: Upload Allure Report as Artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: Edge_Windows_Allure | |
# path: allure-report/* |