-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 2.09 KB
/
ci.yml
File metadata and controls
50 lines (38 loc) · 2.09 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
name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.0.x', '9.0.x']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release --no-restore --verbosity normal
- name: Run Mud.HttpUtils.Tests
run: dotnet test Tests/Mud.HttpUtils.Tests/Mud.HttpUtils.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=httputils-test-results.trx" --results-directory TestResults/Mud.HttpUtils.Tests
- name: Run Mud.HttpUtils.Generator.Tests
run: dotnet test Tests/Mud.HttpUtils.Generator.Tests/Mud.HttpUtils.Generator.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=httputils-generator-test-results.trx" --results-directory TestResults/Mud.HttpUtils.Generator.Tests
- name: Run Mud.EntityCodeGenerator.Tests
run: dotnet test Tests/Mud.EntityCodeGenerator.Tests/Mud.EntityCodeGenerator.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=entity-generator-test-results.trx" --results-directory TestResults/Mud.EntityCodeGenerator.Tests
- name: Run Mud.ServiceCodeGenerator.Tests
run: dotnet test Tests/Mud.ServiceCodeGenerator.Tests/Mud.ServiceCodeGenerator.Tests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=service-generator-test-results.trx" --results-directory TestResults/Mud.ServiceCodeGenerator.Tests
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.dotnet-version }}
path: TestResults/**/*.trx