-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (65 loc) · 2.38 KB
/
Copy pathpipeline-manual-run.yaml
File metadata and controls
74 lines (65 loc) · 2.38 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
name: pipeline-manual-run to run test cases manually
on:
workflow_dispatch:
inputs:
suiteName:
description: "Enter your full suite name"
type: string
required: true
default: "vendor-portal.xml"
testType:
description: "Select type of test to run"
type: choice
required: true
default: "smoke"
options:
- smoke
- regression
- sanity
browserType:
type: choice
description: Which browser type to select?
options:
- chrome
- firefox
- edge
default: chrome
jobs:
run-test-job:
runs-on: ubuntu-latest
steps:
- name: Checking out the repo
uses: actions/checkout@v4
- name: Cache Maven dependencies # adding this to speed up the execution, any changes in pom.xml file will result in cache miss
id: maven-cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: listing the files before running
run: find .
- name: Build the project (compile and install)
run: mvn clean install -DskipTests
- name: Running the test cases
continue-on-error: true
run: mvn clean test -Dsuite=${{ inputs.suiteName }} -Dbrowser=${{ inputs.browserType }} -Dbrowser.headless=true
- name: Printing the Test execution status
if: always() # adding always() since this step will run always even if test cases run fail
continue-on-error: true
run: cat target/test-output/testng-report/TestSuite.txt
- name: Publishing the Test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-upload-extentReport
path: target/test-output/extent-Report
retention-days: 30 # for 30 days the report will persist after that it will be deleted, default is 90 days
download-test-report-job: # this will download the artifact
needs: run-test-job
runs-on: ubuntu-latest
steps:
- name: Download Test Reports
uses: actions/download-artifact@v4
with:
name: test-reports-upload-extentReport
path: test-execution-reports/