-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (74 loc) · 2.07 KB
/
regression.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
78
name: Regression
on:
push:
branches: ["main"]
paths:
- "**.cs"
- "**.csproj"
- "**.sln"
- ".editorconfig"
pull_request:
branches: ["main"]
paths:
- "**.cs"
- "**.csproj"
- "**.sln"
- ".editorconfig"
jobs:
build-pdf-generator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
dotnet-format:
runs-on: ubuntu-latest
needs: build-pdf-generator
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dotnet-format tool
run: dotnet tool install -g dotnet-format
- name: Navigate to root directory
run: cd ..
- name: Run dotnet format
run: dotnet format --no-restore --verify-no-changes --verbosity diagnostic
test-pdf-generator:
runs-on: ubuntu-latest
needs: build-pdf-generator
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Go to Test Directory
run: cd ./PdfGenerator.Test
- name: List Tests
run: dotnet test --no-build -t
- name: Test
run: dotnet test --verbosity normal -r "./Coverage" --collect:"XPlat Code Coverage"
- name: Copy coverage.cobertura.xml to root
run: cp ./Coverage/**/coverage.cobertura.xml ..
- name: Add Coverage Comment
uses: 5monkeys/cobertura-action@v12
with:
path: ../coverage.cobertura.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 75
fail_below_threshold: false
skip_covered: false
show_line: true
show_branch: true
show_class_names: true
show_missing: true
only_changed_files: false