-
-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (52 loc) · 1.74 KB
/
dotnet-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
name: Build and run tests.
on:
push:
branches-ignore:
- 'release/**'
- 'development'
- 'l10n_development'
paths-ignore:
- '**/*.md'
- '.github/*.png'
- 'docs/**/*.*'
- 'workflows/*.yml'
- 'deployment/**/*.*'
jobs:
build-and-test:
runs-on: ubuntu-latest
name: Build application
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore dirs.proj
- name: Build application in Debug mode
run: dotnet build dirs.proj --no-restore -c Debug -p:TreatWarningsAsErrors=true
- name: Build application in Release mode
run: dotnet build dirs.proj --no-restore -c Release -p:TreatWarningsAsErrors=true
- name: Test application in Release mode
run: dotnet test dirs.proj --no-build -c Release --verbosity normal
build-and-test-windows:
runs-on: windows-latest
name: Build application (Windows)
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore dirs.proj
- name: Build application in Debug mode
run: dotnet build dirs.proj --no-restore -c Debug -p:TreatWarningsAsErrors=true
- name: Build application in Release mode
run: dotnet build dirs.proj --no-restore -c Release -p:TreatWarningsAsErrors=true
- name: Test application in Release mode
run: dotnet test dirs.proj --no-build -c Release --verbosity normal