-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (35 loc) · 1.31 KB
/
pr-build-check.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
name: .NET
on:
pull_request:
branches: [ "master" ]
jobs:
build:
name: Build & Check
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
# FIXME: Tools won't run in .NET 6.0 unless you install 3.1.x LTS side by side.
# https://itnext.io/how-to-support-multiple-net-sdks-in-github-actions-workflows-b988daa884e
- name: Install .NET 3.1.x LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Install .NET 6.0.x LTS
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore Tools
run: dotnet tool restore
- name: Restore inspectcode cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/inspectcode
key: inspectcode-${{ hashFiles('.config/dotnet-tools.json', '.github/workflows/pr-build-check.yml', 'src/MilkiBotFramework.sln*') }}
- name: Restore dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src --no-restore
- name: InspectCode
run: dotnet jb inspectcode ./src/MilkiBotFramework.sln --no-build --output="inspectcodereport.xml" --caches-home="inspectcode" --verbosity=WARN
- name: NVika
run: dotnet nvika parsereport "${{github.workspace}}/inspectcodereport.xml" --treatwarningsaserrors