-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.27 KB
/
ci.yml
File metadata and controls
53 lines (43 loc) · 1.27 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
name: Build and Run CI Tests
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '8.0.x'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore Dependencies
run: dotnet restore
- name: Build All Projects
run: dotnet build --configuration Release --no-restore
- name: Run NUnit CI Tests Only
run: |
dotnet test ./Testimize.Tests/Testimize.Tests.csproj \
--configuration Release \
--no-build \
--logger "trx;LogFileName=TestResults.trx" \
--filter "TestCategory=CI" \
--results-directory ./TestResults
- name: Upload Test Results as Artifact
uses: actions/upload-artifact@v4
with:
name: TestResults
path: ./TestResults/TestResults.trx
- name: Visualize Test Results (dorny/test-reporter)
uses: dorny/test-reporter@v1
if: always() # ensures this runs even if tests fail
with:
name: NUnit CI Test Report
path: ./TestResults/TestResults.trx
reporter: dotnet-trx