This repository was archived by the owner on Jun 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (90 loc) · 3.35 KB
/
Copy pathserver_pullrequest.yml
File metadata and controls
96 lines (90 loc) · 3.35 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Server Build Check
on:
pull_request:
branches: [ master, develop ]
env:
CORE_DIR: src/server/MUDhub.Core
CORETESTS_DIR: src/server/MUDhub.Core.Tests
SERVERTESTS_DIR: src/server/MUDhub.Server.Tests
SERVER_DIR: src/server/MUDhub.Server
SOLUTION_DIR: src/server
DOTNET_SDK_VERSION: 3.1.103
jobs:
Build_Core_Library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{env.DOTNET_SDK_VERSION}}
- name: Install dependencies
run: dotnet restore
working-directory: ${{env.CORE_DIR}}
- name: Build Core Library
run: dotnet build --configuration Release --no-restore
working-directory: ${{env.CORE_DIR}}
Build_Core_Library_Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{env.DOTNET_SDK_VERSION}}
- name: Install dependencies
run: dotnet restore
working-directory: ${{env.CORETESTS_DIR}}
- name: Build Core Library Tests
run: dotnet build --no-restore
working-directory: ${{env.CORETESTS_DIR}}
- name: Run Tests
run: dotnet test --no-restore --verbosity normal
working-directory: ${{env.CORETESTS_DIR}}
- name: Install Coverlet
run: dotnet tool install --global coverlet.console
- name: Generate Codecoverage
run: coverlet bin/Debug/netcoreapp3.1/MUDhub.Core.Tests.dll --target "dotnet" --targetargs "test . --no-build -p:CollectCoverage=true" --format opencover --output "result.xml"
working-directory: ${{env.CORETESTS_DIR}}
- name: Upload CodeCoverage Report
run: bash <(curl -s https://codecov.io/bash) -f result.xml
working-directory: ${{env.CORETESTS_DIR}}
Build_Server_Library_Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{env.DOTNET_SDK_VERSION}}
- name: Install dependencies
run: dotnet restore
working-directory: ${{env.SERVERTESTS_DIR}}
- name: Build Core Library Tests
run: dotnet build --no-restore
working-directory: ${{env.SERVERTESTS_DIR}}
- name: Run Tests
run: dotnet test --no-restore --verbosity normal
working-directory: ${{env.SERVERTESTS_DIR}}
# - name: Install Coverlet
# run: dotnet tool install --global coverlet.console
# - name: Generate Codecoverage
# run: coverlet bin/Debug/netcoreapp3.1/MUDhub.Core.Tests.dll --target "dotnet" --targetargs "test . --no-build -p:CollectCoverage=true" --format opencover --output "result.xml"
# working-directory: ${{env.SERVERTESTS_DIR}}
# - name: Upload CodeCoverage Report
# run: bash <(curl -s https://codecov.io/bash) -f result.xml
# working-directory: ${{env.SERVERTESTS_DIR}}
Build_Server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{env.DOTNET_SDK_VERSION}}
- name: Install dependencies
run: dotnet restore
working-directory: ${{env.SERVER_DIR}}
- name: Build Server
run: dotnet build --configuration Release --no-restore
working-directory: ${{env.SERVER_DIR}}