-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (73 loc) · 1.98 KB
/
Copy pathci.yml
File metadata and controls
90 lines (73 loc) · 1.98 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
actions: write
checks: write
pull-requests: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Pack
run: dotnet pack --no-build --configuration Release --output ./artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: nupkg
path: ./artifacts/*.nupkg
retention-days: 30
test:
name: Test
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Run tests
run: dotnet test --no-build --configuration Release --logger "trx;LogFileName=test-results.trx" --results-directory ./TestResults
env:
MCP_TEMPLATE_INTENT_RESOLUTION: true
- name: Upload test results
uses: actions/upload-artifact@v7
if: always()
with:
name: test-results-${{ matrix.os }}
path: ./TestResults/**/*.trx
retention-days: 30
- name: Publish test results
uses: dorny/test-reporter@v3
if: always()
with:
name: Test Results (${{ matrix.os }})
path: ./TestResults/**/*.trx
reporter: dotnet-trx
fail-on-error: true