-
-
Notifications
You must be signed in to change notification settings - Fork 107
42 lines (35 loc) · 1.03 KB
/
pr-build-and-unit-tests.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
name: 🛠️ Build + Unit tests
on:
pull_request:
types: [review_requested, opened, reopened, synchronize]
branches:
- dev
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
- '**/donations.json'
jobs:
build:
if: "!contains(github.event.head_commit.message, '--wip')"
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-2022
env:
Solution_Name: StatisticsAnalysisTool.sln
Test_Project_Path: src\StatisticsAnalysisTool.UnitTests\StatisticsAnalysisTool.UnitTests.csproj
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🏗 dotnet restore
run: dotnet restore src\StatisticsAnalysisTool
- name: 🛠 dotnet build
run: dotnet build src\StatisticsAnalysisTool --no-restore
- name: 🧪 Execute unit tests (Only debug)
if: ${{ matrix.configuration == 'Debug' }}
run: dotnet test $env:Test_Project_Path