Run API test #14
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
### Workflow to run the api test against the backend | |
name: Run API test | |
on: | |
workflow_dispatch: | |
workflow_call: | |
secrets: | |
API_USERNAME: | |
required: true | |
API_PASSWORD: | |
required: true | |
jobs: | |
ApiTest: | |
name: API Test | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #4.0.0 | |
with: | |
node-version: 20 | |
- name: Install newman | |
run: npm install -g newman | |
- name: Run postman collection | |
run: newman run postman/expenses-monitor_api_test.postman_collection.json -e postman/expenses-monitor.postman_environment.json --env-var "API_USERNAME=${{ secrets.API_USERNAME }}" --env-var "API_PASSWORD=${{ secrets.API_PASSWORD }}" |