-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (38 loc) · 1.17 KB
/
unittest-tool.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
44
45
46
47
name: UnitTests
on:
workflow_call:
inputs:
dotnet_sdk_version:
required: true
type: string
REPOSITORY_NAME:
required: true
type: string
jobs:
UnitTests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ inputs.dotnet_sdk_version }}
- name: Setup Node version
uses: actions/setup-node@v3
with:
node-version: 16
- name: Clean
run: dotnet clean && dotnet nuget locals all --clear
- name: Execute dotnet restore
run: dotnet restore
- name: Execute dotnet build
run: dotnet build --no-restore
- name: Execute dotnet test (needs coverlet.collector nuget)
run: dotnet test --no-build --filter FullyQualifiedName!~Integration --collect:"XPlat Code Coverage"
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: ${{inputs.REPOSITORY_NAME}}-test-results
path: src/Tests/**/TestResults/**/coverage.cobertura.xml
retention-days: 1