generated from ShaftHQ/using_SHAFT_Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (124 loc) · 5.3 KB
/
e2eTestsCustomCrossBrowser.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: E2E Tests Custom Cross Browser
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
workflow_dispatch:
jobs:
Firefox_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 Firefox
run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=0 --scale firefox=4 -d --force-recreate
shell: bash
- name: Log Browser Version
run: |
BROWSER_VERSION=$(docker run --rm selenium/node-firefox:4.16.1-20231212 firefox --version | awk "{print \$3}")
echo "Firefox Browser Version: $BROWSER_VERSION"
- name: Install 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="firefox" -DheadlessExecution="true" -DgenerateAllureReportArchive="true" -DscreenshotParams_whenToTakeAScreenshot="FailuresOnly" -DcreateAnimatedGif="false" -Dtest="${{ github.event.inputs.testsPath }}"
- name: Upload Allure Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Firefox_Custom_Linux_Grid_Allure
path: "generatedReport_*.zip"
- name: Upload Allure Report HTML as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Firefox_Custom_Linux_Grid_Allure_HTML
path: "allure-report/index.html"
Chrome_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 Chrome
run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d --force-recreate
shell: bash
- name: Log Browser Version
run: |
BROWSER_VERSION=$(docker run --rm selenium/node-chrome:120.0 google-chrome-stable --version | awk "{print \$3}")
echo "Google Chrome Browser Version: $BROWSER_VERSION"
- name: Install 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="chrome" -DheadlessExecution="true" -DgenerateAllureReportArchive="true" -DscreenshotParams_whenToTakeAScreenshot="FailuresOnly" -DcreateAnimatedGif="false" -Dtest="${{ github.event.inputs.testsPath }}"
- name: Upload Allure Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Chrome_Custom_Linux_Grid_Allure
path: "generatedReport_*.zip"
- name: Upload Allure Report HTML as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Chrome_Custom_Linux_Grid_Allure_HTML
path: "allure-report/index.html"
Edge_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 Edge
run: docker-compose -f src/main/resources/docker-compose/selenium4.yml up --scale chrome=0 --scale edge=4 --scale firefox=0 -d --force-recreate
shell: bash
- name: Log Browser Version
run: |
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"
- name: Install 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="microsoftedge" -DheadlessExecution="true" -DgenerateAllureReportArchive="true" -DscreenshotParams_whenToTakeAScreenshot="FailuresOnly" -DcreateAnimatedGif="false" -Dtest="${{ github.event.inputs.testsPath }}"
- name: Upload Allure Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Edge_Custom_Linux_Grid_Allure
path: "generatedReport_*.zip"
- name: Upload Allure Report HTML as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: Edge_Custom_Linux_Grid_Allure_HTML
path: "allure-report/index.html"