-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.01 KB
/
build.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
name: "build"
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: CI Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --results-directory dist/tests --collect:"XPlat Code Coverage"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-test-results
path: dist/tests/test-results.trx
if: ${{ always() }}
- name: Upload dotnet test coverage
uses: actions/upload-artifact@v3
with:
name: dotnet-test-coverage
path: dist/tests/**/coverage.cobertura.xml
if: ${{ always() }}