-
Notifications
You must be signed in to change notification settings - Fork 19
34 lines (29 loc) · 934 Bytes
/
build.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
# Workflow triggered by push to main
# For all solutions we run restore, build & test
name: Build & Test
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
# Loop through all the solutions in src and restore, build & test
# Skip DocFxCompanionTools.sln, as it is a combination of all solutions.
- name: Restore, build & test
shell: pwsh
run: |
foreach ($sln in (Get-ChildItem -Recurse src\*.sln -Exclude DocFxCompanionTools.sln)) {
Write-Host "Start building $($sln.FullName)"
& dotnet restore $sln.FullName
& dotnet build $sln.FullName --no-restore
& dotnet test $sln.FullName --no-build --verbosity normal
}