-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 2.54 KB
/
pull_request.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
71
72
73
74
75
76
77
name: PR
on:
workflow_dispatch:
pull_request:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
global-json-file: global.json
- name: Tool Restore
run: dotnet tool restore
- name: Build
run: dotnet nuke build
- name: Lint
run: dotnet nuke lint
- name: Tests
run: dotnet nuke test --configuration Release --skip build --no-logo
- name: Test Result
if: ${{ github.actor != 'dependabot[bot]' && (success() || failure()) }}
uses: dorny/[email protected]
with:
name: Test Report
reporter: dotnet-trx
path: tests/**/test_result.xml
- name: Generate Coverage Html Report
if: ${{ github.actor != 'dependabot[bot]' }}
run: dotnet nuke generate-report --no-logo
- name: Coverage monitor
uses: slavcodev/coverage-monitor-action@v1
if: ${{ github.actor != 'dependabot[bot]' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: TestReport/Clover.xml
comment_mode: update
threshold_alert: 50
threshold_warning: 80
comment_footer: false
- name: Create CheckRun for code Coverage
uses: LouisBrunner/[email protected]
if: ${{ github.actor != 'dependabot[bot]' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Coverage Report Summary
conclusion: ${{ job.status }}
output_text_description_file: TestReport/Summary.md
output: '{"summary":"Created by Report-Generator"}'
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ github.actor != 'dependabot[bot]' }}
with:
name: test_report
path: ./TestReport