-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (32 loc) · 1.49 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
28
29
30
31
32
33
34
35
36
name: Console API Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: cp .env.example .env
- run: docker compose up -d --build
- name: Let Docker Spin up
run: sleep 5
- name: Run Console API Tests
run: docker run --network=host -v /home/runner/work/console/console/integration-test/collections:/collections -v /home/runner/work/console/console/integration-test/results/:/results postman/newman:5.3-alpine run /collections/console_mps_apis.postman_collection.json run /collections/console_rps_apis.postman_collection.json -e /collections/console_environment.postman_environment.json --insecure --reporters cli,json,junit --reporter-json-export /results/console_api_results.json --reporter-junit-export /results/console_api_results_junit.xml
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@2741064ab9d7af54b0b1ffb6076cf64c16f0220e # v2.2.2
- name: Upload Postman Results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: rps-api
path: /home/runner/work/console/console/integration-test/results