generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |