-
-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (43 loc) · 1.35 KB
/
continuous-integration.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
name: 'Continuous Integration'
on:
workflow_dispatch:
push:
branches: ['v2']
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
tags-ignore:
- 'v*'
pull_request:
branches: ['v2']
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
jobs:
build:
name: 'Build and Test'
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['7.x', '8.x']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-${{ matrix.dotnet-version }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.dotnet-version }}-nuget
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal