-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (37 loc) · 1.29 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: ubuntu-latest
env:
Solution_Name: SoundMaker.sln # Replace with your solution name, i.e. MyWpfApp.sln.
Test_Project_Path: test/SoundMakerTests.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
# Restore dependencies
- name: Restore dependencies
run: dotnet restore src/SoundMaker/SoundMaker.csproj; dotnet restore test/SoundMakerTests.csproj
# Build the SoundMaker project
- name: Build the SoundMaker project with warns as errors
run: dotnet build src/SoundMaker/SoundMaker.csproj --no-restore --warnaserror
# Build the test project
- name: Build the test project
run: dotnet build test/SoundMakerTests.csproj --no-restore
# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test