-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.85 KB
/
TestBuild.yml
File metadata and controls
65 lines (54 loc) · 1.85 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
name: TestBuild
#Run build within each push of code to master branch
on:
push:
branches: [ "master" ]
jobs:
test-api:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pages: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Install Node on the runner
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: "18.x"
# Install the newman command line utility and also install the html extra reporter
- name: Install newman
run: |
npm install -g newman
npm install -g newman-reporter-htmlextra
# Make directory to upload the test results
- name: Make Directory for results
run: mkdir -p testResults
# Run the POSTMAN collection
- name: Run POSTMAN collection
run: |
newman run SWAPI.postman_collection.json -e swapiEnvironmnent.json --bail -r cli,htmlextra --reporter-htmlextra-export testResults/PostmanResult.html --reporter-htmlextra-darkTheme > testResults/runreport1.html
# Upload the contents of Test Results directory to workspace
#Create and output results
#The reports land in actions tab > summary > Artifacts
- name: Output the run Details
uses: actions/upload-artifact@v2
with:
name: RunReports
path: testResults
# Deployment job
# deploy:
# runs-on: ubuntu-latest
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# permissions:
# id-token: write
# contents: read
# pages: write
# actions: write
# needs: test-api
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2