test pr (ignore) #15
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
name: Automated API tests using newman | |
on: pull_request | |
jobs: | |
automated-api-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Postman CLI | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: "Install newman" | |
run: "npm install -g newman" | |
- name: "Install newman reporter" | |
run: "npm install -g newman-reporter-htmlextra" | |
- name: Run API tests | |
run: | | |
newman run docker-compose/postman/collection.json -e docker-compose/postman/dev.json \ | |
-r htmlextra --reporter-htmlextra-export htmlreport.html --reporter-htmlextra-darkTheme > runreport_dark.html | |
- name: Publish report | |
uses: MeilCli/slack-upload-file@v1 | |
with: | |
slack_token: ${{ secrets.SLACK_TOKEN }} | |
file_path: './htmlreport.html' | |
file_name: 'postmanReport.html' | |
file_type: 'html' | |
channels: 'test-reports' |