-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (113 loc) · 4.02 KB
/
e2eCustom.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: build/allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v3
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
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/*