forked from Devolutions/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.6 KB
/
dotnet-test.yml
File metadata and controls
66 lines (55 loc) · 1.6 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
name: .NET Tests
on:
push:
branches: [ "main" ]
paths:
- '**.cs'
- '**.csproj'
- '**.props'
- '**.targets'
- '**.sln'
- 'src/.editorconfig'
- '.github/workflows/dotnet-test.yml'
pull_request:
branches: [ "main" ]
paths:
- '**.cs'
- '**.csproj'
- '**.props'
- '**.targets'
- '**.sln'
- 'src/.editorconfig'
- '.github/workflows/dotnet-test.yml'
workflow_dispatch:
jobs:
test-codebase:
runs-on: windows-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages
steps:
- name: Checkout the repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/*.props', 'src/**/*.targets', 'src/**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install dependencies
working-directory: src
run: dotnet restore UniGetUI.sln
- name: Check whitespace formatting
run: dotnet format whitespace src --folder --verify-no-changes --verbosity minimal
- name: Check code style formatting
working-directory: src
run: dotnet format style UniGetUI.sln --no-restore --verify-no-changes --verbosity minimal
- name: Run Tests
working-directory: src
run: dotnet test UniGetUI.sln --no-restore --verbosity q --nologo