-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (103 loc) · 3.55 KB
/
task_presentation.yml
File metadata and controls
117 lines (103 loc) · 3.55 KB
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
# 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: CICD for Bitpanda challenge
on:
pull_request:
branches:
- master
workflow_dispatch:
inputs:
logLevel:
description: 'Manual Trigger'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
build:
env:
UI_TASK_RESULTS_PATH: ui-task/target/allure-results
LOAD_TASK_RESULTS_PATH: load-task/target/allure-results
API_TASK_RESULTS_PATH: api-task/target/allure-results
JMETER_TEST_PLAN_PATH: load-task/src/test/resources/jmeter/load_task.jmx
ZEROCODE_RESULTS_FILE: load-task/target/zerocode-junit-granular-report.csv
TEST_RESULTS_FOLDER: test-results
TEST_API_USER: ${{ secrets.API_USER }}
TEST_API_PASSWORD: ${{ secrets.API_PASSWORD }}
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache the Maven packages to speed up build
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup Firefox
run: |
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa
sudo apt-get update
sudo apt-get install firefox-trunk
- name: Run UI Task
if: always()
run: mvn clean test -DisHeadless=true --file ui-task/pom.xml
continue-on-error: true
- name: Run Load Task with zero code
if: always()
run: mvn clean test --file load-task/pom.xml
continue-on-error: true
- name: Run Api Task
if: always()
run: mvn clean test -DAPI_USER="${{ env.TEST_API_USER }}" -DAPI_PASSWORD="${{ env.TEST_API_PASSWORD}}" --file api-task/pom.xml
continue-on-error: true
- name: Run Load Task with JMeter
uses: rbhadti94/apache-jmeter-action@v0.3.1
with:
testFilePath: ${{ env.JMETER_TEST_PLAN_PATH }}
outputReportsFolder: jmeter-reports/
continue-on-error: true
- name: Merge allure test results to one folder
if: always()
run: |
sudo mkdir $TEST_RESULTS_FOLDER
sudo cp -a $UI_TASK_RESULTS_PATH/. $TEST_RESULTS_FOLDER
sudo cp -a $LOAD_TASK_RESULTS_PATH/. $TEST_RESULTS_FOLDER
sudo cp -a $API_TASK_RESULTS_PATH/. $TEST_RESULTS_FOLDER
continue-on-error: true
- name: Prepare additional artifacts to upload
if: always()
run: |
sudo mkdir downloads
sudo cp $ZEROCODE_RESULTS_FILE downloads
sudo cp -r jmeter-reports/. downloads
continue-on-error: true
- name: Upload additional artifacts
uses: actions/upload-artifact@v2
with:
name: assets-for-download
path: downloads
- name: Get Allure history
uses: actions/checkout@v2
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()
with:
allure_results: test-results
allure_history: allure-history
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.SECRET_ACCESS_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history