-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (70 loc) · 2.51 KB
/
dotnetcore.yml
File metadata and controls
85 lines (70 loc) · 2.51 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: dotnetcore
# https://www.edwardthomson.com/blog/github_actions_advent_calendar.html
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
dotnet: [ '3.1.201' ] #, '5.0.100-preview.3.20216.6' ]
configuration: [ Release, Debug ]
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.nuget/packages
key: ${{ matrix.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ matrix.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
#- name: Setup .NET Core 5.0
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '5.0.100-preview.3.20216.6' #${{ matrix.dotnet }}
#- name: Build with dotnet
# run: dotnet build --configuration ${{ matrix.configuration }}
# https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
- name: Test with dotnet 3.1
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
if: startsWith(matrix.dotnet, '3.1') # Should set a framework variable instead
run: dotnet test --framework netcoreapp3.1 --configuration ${{ matrix.configuration }} --nologo ./tests/DotNetCross.Sorting.Tests/DotNetCross.Sorting.Tests.csproj
- name: Test with dotnet 5.0
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
if: startsWith(matrix.dotnet, '5.0')
run: dotnet test --framework netcoreapp5.0 --configuration ${{ matrix.configuration }} --nologo ./tests/DotNetCross.Sorting.Tests/DotNetCross.Sorting.Tests.csproj