-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 922 Bytes
/
api_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
### 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 }}"