-
Notifications
You must be signed in to change notification settings - Fork 52
43 lines (39 loc) · 1.29 KB
/
run_newman.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
37
38
39
40
41
42
43
name: newman_tests
on:
#push
#workflow_dispatch
jobs:
api-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Newman and HTML Reporter
run: |
npm install -g newman@5.3.1
npm install -g newman-reporter-htmlextra@1.22.7
- name: Restore dependencies
run: dotnet restore ./src/AasxServerBlazor/AasxServerBlazor.csproj
- name: Build
run: dotnet build ./src/AasxServerBlazor/AasxServerBlazor.csproj -c Release -o ./build
- name: Start Test Server And Execute Test Scripts
run: |
cd build
dotnet ./AasxServerBlazor.dll --aspnet --data-path ../test/rest_api/data &
sleep 10
cd ..
newman run ./test/rest_api/postman/SubmodelElementTest.json.postman_collection -e ./test/rest_api/postman/GitHubActionEnvironment.json.postman_environment --reporters cli,htmlextra --reporter-htmlextra-export report.html --insecure
kill -9 `lsof -i:5001 -t`
- name: Upload Report
uses: actions/upload-artifact@v2
if: always()
with:
name: report.html
path: ./report.html