-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.08 KB
/
test.yml
File metadata and controls
42 lines (35 loc) · 1.08 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
name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Set up nuget dependency caching for faster builds
uses: actions/cache@v3
id: nuget-cache
with:
path: |
~/.nuget/packages
${{ github.workspace }}/**/obj/project.assets.json
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
${{ runner.os }}-nuget-
- name: Restore with dotnet
run: dotnet restore
- name: Build with dotnet
run: dotnet build --configuration Release --no-restore
- name: Run .NET Unit Tests
run:
dotnet test --no-build --configuration Release --logger GitHubActions --
RunConfiguration.CollectSourceInformation=true