-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (35 loc) · 1.2 KB
/
dotnet.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
name: .NET
on: [push, pull_request]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Linux, os: ubuntu-22.04 }
- { name: Windows, os: windows-2022 }
- { name: macOS, os: macos-12 }
dotnet:
- { name: .NET Core 3.1, version: "3.1" }
- { name: .NET 5, version: "5.0.x" }
- { name: .NET 6, version: "6.0.x" }
- { name: .NET 7, version: "7.0.x" }
steps:
- uses: actions/checkout@v3
- name: Setup .NET ${{ matrix.dotnet.version }} SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet.version }}
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Build
run: dotnet build ./Sources -c Release
- name: Test
if: matrix.dotnet.version == '6.0.x'
run: dotnet test ./Sources -v n --no-restore --no-build -c Release