-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (115 loc) · 6.38 KB
/
maven.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
# This workflow will build a test Java + JUnit + Appium + BrowserStack project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Test Run
run-name: ${{github.event.inputs.device_name_and_version}}
on:
workflow_dispatch:
inputs:
test_tag:
description: 'Tags to run'
required: true
default: '@example_tag'
bs_app_link:
description: 'app_url of uploaded to BS link'
required: true
default: 'bs://0b0718a5fc1dc8444a6f437e2790299b731e38ef'
build_name:
description: 'build name of given application'
required: true
default: 'palace-debug'
platform_name:
description: 'Platform name'
required: true
default: 'android'
device_name_and_version:
description: 'device name and version for autotests'
required: true
default: 'SamsungGalaxyS22Ultra_12'
jobs:
job:
name: "${{github.event.inputs.device_name_and_version}}"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Run tests
run: mvn clean test -Daquality.buildName="${{github.event.inputs.build_name}}" -DdriverSettings.${{github.event.inputs.platform_name}}.deviceKey=${{github.event.inputs.device_name_and_version}} -Daquality.suiteName="${{github.event.inputs.platform_name}} - ${{github.event.inputs.test_tag}}" -Daquality.environment="${{github.event.inputs.platform_name}}" -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.LYRASISReads."ios".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.LYRASISReads."android".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.A1QATestLibrary."ios".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis1}}=${{secrets.BookPinLyrasis1}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis2}}=${{secrets.BookPinLyrasis2}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis3}}=${{secrets.BookPinLyrasis3}} -Dcredentials.A1QATestLibrary."android".${{secrets.BookCardLyrasis4}}=${{secrets.BookPinLyrasis4}} -DremoteConnectionUrl=${{secrets.remoteConnectionUrl}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities."browserstack.user"=${{secrets.BROWSERSTACK_USER}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities."browserstack.key"=${{secrets.BROWSERSTACK_KEY}} -DplatformName=${{github.event.inputs.platform_name}} -DdriverSettings.${{github.event.inputs.platform_name}}.capabilities.app=${{github.event.inputs.bs_app_link}} -Dcucumber.options="--tags '(${{github.event.inputs.test_tag}} and not @ignore) and not @exclude_${{github.event.inputs.platform_name}}'"
continue-on-error: true
- name: Generate Allure report
run: |
mkdir allure-results
cp -R target/allure-results allure-results
allure generate allure-results --clean -o allure-report
working-directory: ${{ github.workspace }}
- name: Upload Allure report artifacts
uses: actions/upload-artifact@v2
with:
name: allure-report
path: allure-report
# - name: Upload Report
# if: success()
# uses: actions/upload-artifact@v2
# with:
# name: cucumber-report
# path: target/cucumber-report
# - name: Complete Workflow
# if: always()
# run: echo "Workflow completed successfully"
# - name: Generate Cucumber JSON Report
# run: mvn exec:java -Dexec.mainClass="io.cucumber.core.cli.Main" -Dexec.args="--plugin json:target/cucumber-report.json src/test/java/features"
#
# - name: Upload Cucumber JSON Report
# uses: actions/upload-artifact@v2
# with:
# name: cucumber-report
# path: target/cucumber-report.json
# - name: Generate Allure Report
# uses: AEkaterina/[email protected]
# if: success() || failure()
#
# - name: Upload report
# uses: actions/upload-artifact@v3
# with:
# name: allure-report
# path: allure-report/
# if: success() || failure()
# - name: Get Allure history
# uses: actions/checkout@v3
# if: always()
# continue-on-error: true
# with:
# ref: gh-pages
# path: gh-pages
# - name: Allure Report action from marketplace
# uses: simple-elf/allure-report-action@master
# if: always()
# id: allure-report
# with:
# allure_results: allure-results
# gh_pages: gh-pages
# allure_report: allure-report
# allure_history: allure-history
# - name: Deploy report to GitHub Pages
# if: always()
# uses: peaceiris/actions-gh-pages@v2
# env:
# PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: allure-history
# - name: Debug Workflow
# run: |
# ls -R allure-results
# pwd
# - name: Post the link to the report
# if: always()
# uses: Sibz/github-status-action@v1
# with:
# authToken: ${{secrets.PERSONAL_TOKEN}}
# context: 'Test report'
# state: 'success'
# sha: ${{ github.event.pull_request.head.sha || github.sha }}
# target_url: https://thepalaceproject.github.io/allure-html-reporter-github-pages/${{ github.run_number }}