-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.01 KB
/
main.yml
File metadata and controls
39 lines (38 loc) · 1.01 KB
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
name: Github Actions
on: ["push"]
env:
DOTNET_NOLOGO: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
dotnet-unit-tests:
name: .NET unit tests
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false # don't kill tests when one environment fails
matrix:
os: [ubuntu-latest, windows-2022, macOS-latest]
steps:
- uses: actions/checkout@v2
# .NET
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
7.0.102
- if: ${{ runner.os == 'Windows' }}
uses: microsoft/setup-msbuild@v1.1
- run: dotnet build src /WarnAsError
- run: dotnet build exampleTest
- run: dotnet test
--logger "GitHubActions;report-warnings=true"
--configuration Debug
-p:WarningLevel=0
exampleTest
shell: bash
- run: dotnet test
--logger "GitHubActions;report-warnings=true"
--configuration Release
-p:WarningLevel=0
exampleTest
shell: bash