-
Notifications
You must be signed in to change notification settings - Fork 10
163 lines (156 loc) · 6.36 KB
/
test.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: E2E Tests
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
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@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Set up Native Selenium Grid
if: runner.os == 'Linux'
run: docker compose -f GUI_Web/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
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: |
cd GUI_Web/
if [ "$RUNNER_OS" == "Linux" ]; then
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="LINUX" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome"
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"
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Run tests on Windows
if: runner.os == 'Windows'
continue-on-error: true
run: |
cd GUI_Web/
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="WINDOWS" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge"
- name: Upload Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} - Desktop Browsers Tests Report
path: "GUI_Web/allure-reports/*_AllureReport.html"
GUI_Web_Basic:
name: Run GUI_Web_Basic Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-latest, macOS-12 ]
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
if: runner.os == 'Linux'
run: docker compose -f GUI_Web_Basic/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
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: |
cd GUI_Web_Basic/
if [ "$RUNNER_OS" == "Linux" ]; then
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome"
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"
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Run tests on Windows
if: runner.os == 'Windows'
continue-on-error: true
run: |
cd GUI_Web_Basic/
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="Windows" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge"
- name: Upload Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} - Desktop Browsers Tests Report
path: "GUI_Web_Basic/allure-reports/*_AllureReport.html"
GUI_Web_Cucumber:
name: Run GUI_Web_Cucumber Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-latest, macOS-12 ]
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
if: runner.os == 'Linux'
run: docker compose -f GUI_Web_Cucumber/src/main/resources/docker-compose/selenium4.yml up --scale chrome=4 --scale edge=0 --scale firefox=0 -d
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
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: |
cd GUI_Web_Cucumber/
if [ "$RUNNER_OS" == "Linux" ]; then
mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome"
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"
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Run tests on Windows
if: runner.os == 'Windows'
continue-on-error: true
run: |
cd GUI_Web_Cucumber/
mvn test -DexecutionAddress="local" -DtargetOperatingSystem="Windows" -DmaximumPerformanceMode="2" -DtargetBrowserName="MicrosoftEdge"
- name: Upload Report as Pipeline Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} - Desktop Browsers Tests Report
path: "GUI_Web_Cucumber/allure-reports/*_AllureReport.html"