@@ -4,10 +4,10 @@ name: Newman CLI Tests Execution
4
4
on :
5
5
# Triggers the workflow on push or pull request events but only for the "main" branch
6
6
push :
7
- branches :
8
- - master
7
+ branches :
8
+ - master
9
9
pull_request :
10
- branches : [ "master" ]
10
+ branches : ["master"]
11
11
12
12
# Allows you to run this workflow manually from the Actions tab
13
13
workflow_dispatch :
@@ -17,33 +17,31 @@ jobs:
17
17
test_api_collection :
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21
- - uses : actions/checkout@v3.3.0
22
-
23
-
24
- # INstall Node on the runner
25
- - name : Install Node
26
- uses : actions/setup-node@v3.6.0
27
- with :
28
- node-version : ' 16.x'
29
-
30
- # Install the newman command line utility and also install the html extra reporter
31
- - name : Install newman
32
- run : |
33
- npm install -g newman
34
- npm install -g newman-reporter-htmlextra
35
- # Make directory to upload the test results
36
- - name : Make directory for results
37
- run : mkdir -p TestResults
20
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21
+ - uses : actions/checkout@v3.3.0
38
22
23
+ # INstall Node on the runner
24
+ - name : Install Node
25
+ uses : actions/setup-node@v3.6.0
26
+ with :
27
+ node-version : " 16.x"
39
28
40
- # Run the POSTMAN collection
41
- - name : Run Sample Postman Collections
42
- run : |
43
- newman run collections/postman_collection.json --reporters cli,htmlextra --reporter-htmlextra-export TestResults/HtmlReport.html
44
- # Upload the contents of Test Results directory to workspace
45
- - name : Output the run details
46
- uses : actions/upload-artifact@v3.1.2
47
- with :
48
- name : Test Results
49
- path : TestResults
29
+ # Install the newman command line utility and also install the html extra reporter
30
+ - name : Install newman
31
+ run : |
32
+ npm install -g newman
33
+ npm install -g newman-reporter-htmlextra
34
+ # Make directory to upload the test results
35
+ - name : Make directory for results
36
+ run : mkdir -p TestResults
37
+
38
+ # Run the POSTMAN collection
39
+ - name : Run Sample Postman Collections
40
+ run : |
41
+ newman run collections/postman_collection.json -e collections/Test.postman_environment.json --reporters cli,htmlextra --reporter-htmlextra-export TestResults/HtmlReport.html
42
+ # Upload the contents of Test Results directory to workspace
43
+ - name : Output the run details
44
+ uses : actions/upload-artifact@v3.1.2
45
+ with :
46
+ name : Test Results
47
+ path : TestResults
0 commit comments