Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional logging #33

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The latest version of your collection and/or environment is available through [P
- uses: actions/checkout@master
- uses: matt-ball/newman-action@master
with:
postmanApiKey: ${{ secrets.postmanApiKey }}
apiKey: ${{ secrets.postmanApiKey }}
collection: 5922408-c22ef764-b464-424c-8702-750343478723
environment: 5922408-228c7edd-fc15-4f68-9665-a35d7df6945b
```
Expand Down
20 changes: 15 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,19 @@ function split (str) {
}

function runNewman (options) {
newman.run(options).on('done', (err, summary) => {
if (!options.suppressExitCode && (err || summary.run.failures.length)) {
core.setFailed('Newman run failed!' + (err || ''))
}
})
console.log(options)
newman.run(options)
.on('beforeRequest', (err, args) => {
console.log(err)
})
.on('request', (err, args) => {
console.log(err)
})
.on('done', (err, summary) => {
console.log(err)
console.log(summary.error)
if (!options.suppressExitCode && (err || summary.run.failures.length)) {
core.setFailed('Newman run failed!' + (err || ''))
}
})
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "newman-action",
"version": "0.3.0",
"version": "0.3.1",
"description": "Run Postman collections with Newman as a GitHub Action",
"main": "dist/index.js",
"repository": {
Expand Down