-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (37 loc) · 1.25 KB
/
test.yml
File metadata and controls
46 lines (37 loc) · 1.25 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
name: Unit Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual trigger
jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
- name: Restore dependencies
run: dotnet restore tests/SentenceStudio.UnitTests/SentenceStudio.UnitTests.csproj
- name: Build unit tests
run: dotnet build tests/SentenceStudio.UnitTests/SentenceStudio.UnitTests.csproj --no-restore --configuration Release
- name: Run unit tests
run: dotnet test tests/SentenceStudio.UnitTests/SentenceStudio.UnitTests.csproj --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: tests/SentenceStudio.UnitTests/TestResults/*.trx
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Unit Test Results
path: tests/SentenceStudio.UnitTests/TestResults/*.trx
reporter: dotnet-trx