forked from open-amt-cloud-toolkit/mps
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 1.45 KB
/
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
name: MPS API Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker build -f Dockerfile -t mps:${GITHUB_SHA} .
- run: docker-compose up -d
- run: sleep 30
- run: docker run --network=host -v /home/runner/work/mps/mps/src/test/collections/:/collections -v /home/runner/work/mps/mps/src/test/results/:/results postman/newman run /collections/MPS.postman_collection.json -e /collections/MPS.postman_environment.json --insecure --reporters cli,json,junit --reporter-json-export /results/mps_api_results.json --reporter-junit-export /results/mps_api_results_junit.xml
- run: docker run --network=host -v /home/runner/work/mps/mps/src/test/collections/:/collections -v /home/runner/work/mps/mps/src/test/results/:/results postman/newman run /collections/mps_security_api_test_postman_collection.json -e /collections/MPS.postman_environment.json -d /collections/data/mps_security_api_test_data.json --insecure --reporters cli,json,junit --reporter-json-export /results/mps_api_security_results.json --reporter-junit-export /results/mps_api_security_results_junit.xml
- name: Dump docker logs on
if: failure()
uses: jwalton/gh-docker-logs@v1
- name: Upload Postman Results
uses: actions/upload-artifact@v3
with:
name: mps-api
path: /home/runner/work/mps/mps/src/test/results