-
-
Notifications
You must be signed in to change notification settings - Fork 51
55 lines (51 loc) · 2.12 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Sidekick Build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
ASPNETCORE_ENVIRONMENT: Production
steps:
- name: Git - Checkout
uses: actions/checkout@v2
- name: .NET - Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: NuGet - Setup
uses: NuGet/[email protected]
- name: NuGet - Source
uses: fabriciomurta/ensure-nuget-source@v1
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Tests
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
- name: Tests - Unit Tests Report
uses: dorny/[email protected]
with:
name: Tests - Unit Tests
path: '**/*.trx'
reporter: dotnet-trx
- name: ReportGenerator
uses: danielpalme/[email protected]
with:
reports: ' tests\Sidekick.Application.Tests\coverage.cobertura.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved.
reporttypes: 'HtmlInline;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
title: 'Sidekick Coverage' # Optional title.
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.
- name: Upload coverage report artifact
uses: actions/[email protected]
with:
name: CoverageReport # Artifact name
path: coveragereport # Directory containing files to upload