-
-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (43 loc) · 1.34 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: ['8.x']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
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