-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.16 KB
/
check-pr.yaml
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
name: "Check PR"
on:
pull_request:
branches:
- "main"
paths:
- "src/**"
workflow_dispatch:
concurrency:
group: "${{github.workflow}}-${{github.head_ref}}"
cancel-in-progress: true
jobs:
build_and_test:
name: "Build & Run Tests"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Setup .NET CLI"
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: "Restore Solution NuGets"
run: dotnet restore
- name: "Build Solution"
run: dotnet build
--no-restore
--configuration "Release"
- name: "Run Solution Tests"
run: dotnet test
--no-restore --no-build
--configuration "Release"
--settings "src/CodeCoverage.runsettings"
--collect "XPlat Code Coverage"
--logger "trx;logfileprefix=tr"
- name: "Publish Solution Test Results"
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: "test-results"
path: "src/**/TestResults/*.trx"