@@ -4,10 +4,10 @@ name: Newman CLI Tests Execution
44on :
55 # Triggers the workflow on push or pull request events but only for the "main" branch
66 push :
7- branches :
8- - master
7+ branches :
8+ - master
99 pull_request :
10- branches : [ "master" ]
10+ branches : ["master"]
1111
1212 # Allows you to run this workflow manually from the Actions tab
1313 workflow_dispatch :
@@ -17,33 +17,31 @@ jobs:
1717 test_api_collection :
1818 runs-on : ubuntu-latest
1919 steps :
20- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21- 22-
23-
24- # INstall Node on the runner
25- - name : Install Node
26- 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+ 3822
23+ # INstall Node on the runner
24+ - name : Install Node
25+ 26+ with :
27+ node-version : " 16.x"
3928
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- 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+ 45+ with :
46+ name : Test Results
47+ path : TestResults
0 commit comments