-
-
Notifications
You must be signed in to change notification settings - Fork 379
54 lines (52 loc) · 1.81 KB
/
ci.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
name: .NET CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # all
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Setup gitversion
run: dotnet tool install --global GitVersion.Tool
- name: Calculate version
id: calc_version
run: |
GITVERSION=$(dotnet-gitversion /output json /showvariable FullSemVer)
echo "::set-output name=PROJECT_VERSION::$GITVERSION"
- name: Restore packages
run: dotnet restore DynamicExpresso.sln
- name: Build
run: dotnet build DynamicExpresso.sln --no-restore -c Release /p:Version=${{steps.calc_version.outputs.PROJECT_VERSION}}
- name: Test .net core 3.1
run: dotnet test DynamicExpresso.sln --no-build --no-restore -c Release --verbosity normal -f netcoreapp3.1
- name: Test .net core 7.0
run: dotnet test DynamicExpresso.sln --no-build --no-restore -c Release --verbosity normal -f net7.0
test-win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore packages
run: dotnet restore DynamicExpresso.sln
- name: Build
run: dotnet build DynamicExpresso.sln --no-restore -c Release
- name: Test .net 4.6.1
run: dotnet test DynamicExpresso.sln --no-build --no-restore -c Release --verbosity normal -f net461
- name: Test .net 4.5
run: dotnet test DynamicExpresso.sln --no-build --no-restore -c Release --verbosity normal -f net45