-
Notifications
You must be signed in to change notification settings - Fork 47
135 lines (118 loc) · 5.78 KB
/
debug.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: JDI auto-tests debug Angular tests
env:
CHROME_PROPERTIES: "chrome.properties"
FIREFOX_PROPERTIES: "ff.properties"
WITH_PARAMS: "-ntp -Ddriver=chrome" # for Chrome: "-ntp -Ddriver=chrome"
GROUP_ID: "com.epam.jdi"
NOPO_TESTS: "jdi-bdd-no-po-tests"
NOPO_TESTS_PROPERTY: "test-examples/jdi-bdd-no-po-tests"
BDD_TESTS: "jdi-bdd-tests"
BOOTSTRAP_TESTS: "jdi-light-bootstrap-tests"
HTML_TESTS: "jdi-light-html-tests"
ANGULAR_TESTS: "jdi-light-angular-tests"
ANGULAR_TESTS_WITH_MOCKS: "jdi-light-angular-tests-with-mocks"
EXAMPLES: "jdi-light-examples"
EXAMPLES_PROPERTY: "test-examples/jdi-light-examples"
MATERIAL_UI: "jdi-light-material-ui-tests"
PERFORMANCE: "jdi-performance"
PERFORMANCE_PROPERTY: "test-examples/jdi-performance"
VUETIFY_TESTS: "jdi-light-vuetify-tests"
CHROME_ARGS: "--no-sandbox --headless --disable-dev-shm-usage --disable-gpu --window-size=1920,1080"
FIREFOX_ARGS: "-headless"
ALLURE_VERSION: "2.13.8"
on:
push:
branches: [ angular_rework_development ] # ENTER branch name there
pull_request:
branches: [ angular_rework_development ] # ENTER branch name there
# !!!! PLEASE do not change this file in master, as it's only template for branch debug in GitHub Actions
jobs:
build:
name: Degug tests run on JDK
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
java: [11, 15, 17, 18] # all [11, 12, 13, 14, 15, 16, 17, 18, 21]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
java-package: jdk
distribution: 'zulu'
cache: 'maven'
- name: Prepare environment
run: |
sudo apt install zip
java -Xmx32m -version
ls -lah
env
id
# Allure download is not stable, so using local archive
# curl -o allure-${ALLURE_VERSION}.tgz -Ls https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/${ALLURE_VERSION}/allure-${ALLURE_VERSION}.tgz
- name: Install Allure
run: |
sudo tar -zxvf allure.tgz -C /opt/
sudo ln -s /opt/allure-${ALLURE_VERSION}/bin/allure /usr/bin/allure
allure --version
# - name: Install Netlify
# run: sudo npm install -g netlify-cli
- name: Welcome to JDI
run: |
echo ------------------- WELCOME TO JDI -----------------------
mvn --version
- name: Prepare configs
run: |
echo arguments=$CHROME_ARGS > "./${BDD_TESTS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${BDD_TESTS}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${BOOTSTRAP_TESTS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${BOOTSTRAP_TESTS}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${HTML_TESTS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${HTML_TESTS}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${EXAMPLES_PROPERTY}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${EXAMPLES_PROPERTY}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${PERFORMANCE_PROPERTY}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${PERFORMANCE_PROPERTY}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${VUETIFY_TESTS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${VUETIFY_TESTS}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${MATERIAL_UI}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${MATERIAL_UI}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${ANGULAR_TESTS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${ANGULAR_TESTS}/src/test/resources/${FIREFOX_PROPERTIES}"
echo arguments=$CHROME_ARGS > "./${ANGULAR_TESTS_WITH_MOCKS}/src/test/resources/${CHROME_PROPERTIES}"
echo arguments=$FIREFOX_ARGS > "./${ANGULAR_TESTS_WITH_MOCKS}/src/test/resources/${FIREFOX_PROPERTIES}"
- name: Compile jdi code
id: jdi-compile
run: mvn -ntp install -DskipTests -Dsource.skip -Dmaven.source.skip -Dmaven.javadoc.skip=true
# ========== steps before required for all tasks ==================
- name: Run tests - Angular
id: tests-angular
if: steps.jdi-compile.outcome == 'success'
timeout-minutes: 60 # prevent blocking
continue-on-error: true
run: mvn verify $WITH_PARAMS -Dchrome.capabilities.path=${CHROME_PROPERTIES} -Dff.capabilities.path=${FIREFOX_PROPERTIES} -pl $GROUP_ID:$ANGULAR_TESTS --fail-at-end
- name: Collect reports
if: steps.jdi-compile.outcome == 'success'
run: |
echo --------------- Collecting Allure Reports.... ------------------
sudo chmod +x reporting.sh
source reporting.sh
generateAllureReports
printAllureSummary ${{ matrix.java }}
zip -r allure-report.zip ./allure-report/
- name: 'Upload allure report'
if: steps.jdi-compile.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: allure-report-jdk${{ matrix.java }}
path: ./allure-report.zip
retention-days: 1
- name: Check angular tests are passed
if: ${{ steps.tests-angular.outcome != 'success' }}
run: |
echo Angular tests result: ${{ steps.tests-angular.outcome }}
exit 1