forked from LykkeCity/MT
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (59 loc) · 2.02 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: .NET
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
inputs:
configuration:
description: "Build configuration"
required: true
default: "Release"
branches:
description: "Branches to build"
required: true
default: "master"
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: |
echo "Branches: ${{ github.event.inputs.branches }}"
echo "Configuration: ${{ github.event.inputs.configuration }}"
echo "Event name: ${{ github.event_name }}"
echo "Event ref: ${{ github.event.ref }}"
echo "Environment: ${{ github.event.environment }}"
- name: Checkout source code
uses: actions/checkout@v4
- name: Checkout NuGet config
uses: actions/checkout@v4
with:
repository: LykkeBusiness/.github
path: LykkeBusinessTools
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Restore dependencies
run: dotnet restore --configfile LykkeBusinessTools/config/snow/nuget.config
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: "10 20"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
with:
recreate: true
path: code-coverage-results.md