-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (31 loc) · 1 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
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
dotnet: [ '3.1.x', '5.0.x', '6.0.x', '8.0.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: ${{ matrix.dotnet }}
# By default, tests will be executed under the latest installed version!
- name: Create temporary global.json
run: echo '{"sdk":{"version":"${{steps.stepid.outputs.dotnet-version}}"}}' > ./global.json
# - name: Restore nuget dependencies
# run: dotnet restore
# - name: Build solution
# run: dotnet build --no-restore
- name: Build solution
run: dotnet build --framework ${{ matrix.dotnet.framework }}
- name: Run tests
run: dotnet test --no-build --verbosity normal --framework ${{ matrix.dotnet.framework }}