Skip to content

Instantly share code, notes, and snippets.

@soufiane-bouchaara
Created July 4, 2020 13:24
Show Gist options
  • Save soufiane-bouchaara/358fafe93df6b44d2f9bd86210197043 to your computer and use it in GitHub Desktop.
Save soufiane-bouchaara/358fafe93df6b44d2f9bd86210197043 to your computer and use it in GitHub Desktop.
name: Newman Test Run
on:
push:
branches:
- master
- staging
jobs:
newman:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
collectionID: 10954437-8cb0d465-dff6-4319-a607-caad24998335
environmentID: 98798-a974f882-8ecg0-4c80-9901-a583778393987a
- run: npm install -g newman
- run: newman run "https://api.getpostman.com/collections/${{collectionID}}?apikey=${{ secrets.POSTMANAPIKEY }}" --environment "https://api.getpostman.com/environments/${{ environmentID }}?apikey=${{ secrets.POSTMANAPIKEY }}"
@QA1980
Copy link

QA1980 commented Sep 25, 2020

Thanks for helpful yml , however , Im getting this error right now , any idea ? thanks
**```
error: collection could not be loaded
Error fetching the collection from the provided URL. Ensure that the URL is valid.
Invalid API Key. Every request requires a valid API Key to be sent.

@CarlinGebyte
Copy link

Very helpful, your work saves me <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment