-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (55 loc) · 1.66 KB
/
build.yaml
File metadata and controls
67 lines (55 loc) · 1.66 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
name: Build
on:
push:
branches: [master]
tags: ['v*']
pull_request:
permissions:
pull-requests: write
env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
MSBUILDTERMINALLOGGER: auto
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.*
dotnet-quality: ga
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test with Coverage
run: >
dotnet test --no-restore --no-build --configuration Release
--results-directory coverage
-- --report-github
--report-xunit-trx --report-xunit-trx-filename test-results.trx
--coverage --coverage-output coverage.cobertura.xml --coverage-output-format cobertura
- name: Code Coverage Summary
uses: irongut/CodeCoverageSummary@v1.3.0
if: always()
with:
filename: coverage/coverage.cobertura.xml
badge: true
format: "markdown"
output: "both"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v3
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
- name: Write Coverage to Job Summary
if: always()
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY || true