Update README.md #18
This file contains hidden or 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
| name: API Contract Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| run-postman-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install Newman | |
| run: npm install -g newman newman-reporter-htmlextra | |
| - name: Run Postman tests | |
| run: | | |
| newman run postman/JSONPlaceholder_API_Contract_Tests.postman_collection.json -e postman/Development_Environment.json -r cli,htmlextra --reporter-htmlextra-export newman-report.html | |
| - name: Upload Newman HTML Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: newman-report | |
| path: newman-report.html |