Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-ball authored Aug 29, 2019
1 parent 49e663f commit 3d1f408
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
# JavaScript Action Template
# Newman Action

This template offers an easy way to get started writing a JavaScript action with TypeScript compile time support, unit testing with Jest and using the GitHub Actions Toolkit.
Allows you to run Postman's headless collction runner, Newman, via a GitHub Action meaning no config of the Newman lib itself.

## Getting Started

See the walkthrough located [here](https://github.com/actions/toolkit/blob/master/docs/javascript-action.md).
Currently this action only works via retrieving your collection/environment through [Postman's API](https://docs.api.getpostman.com/?version=latest). The API docs contain endpoints that will allow you to retrieve these IDs. Therefore you'll need to pass:

In addition to walking your through how to create an action, it also provides strategies for versioning, releasing and referencing your actions.
- Your [Postman API key](https://docs.api.getpostman.com/?version=latest#authentication)
- The collection ID
- The environment ID

## Example workflow file

This yml file should be located in `.github/workflows`

```
name: Newman Run
on:
pull_request:
branches:
- master
jobs:
newman:
runs-on: ubuntu-latest
steps:
- uses: matt-ball/[email protected]
with:
postmanApiKey: ${{ secrets.postmanApiKey }}
collection: 5922408-c22ef764-b464-424c-8702-750343478723
environment: 5922408-228c7edd-fc15-4f68-9665-a35d7df6945b
```

See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for more.

0 comments on commit 3d1f408

Please sign in to comment.