Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/newman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test-Build
on:
push:
branches:
- *
jobs:
test-api:
runs-on: ubuntu-latest
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: '12.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 ./tests/pokemon-api-collection.json -e ./tests/pokemonapi-env.json -r htmlextra --reporter-htmlextra-export testResults/htmlreport.html --reporter-htmlextra-darkTheme > testResults/runreport1.html

# Upload the contents of Test Results directory to workspace
- name: Output the run Details
uses: actions/upload-artifact@v2
with:
name: RunReports
path: testResults