Repository navigation
79 lines (67 loc) · 2.83 KB
/
Copy pathci.yml
File metadata and controls
79 lines (67 loc) · 2.83 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
name: CI
# Every push to main, and every pull request into it: build the packages the way a release builds them, run
# the tests and prove Native AOT, without publishing. Releases come from tags - see release.yml. Toolchain pins match
# release.yml - bump them together.
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- '.claude-plugins/**'
- 'skills/**'
pull_request:
branches: [ main ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
# xcode-27 (a preview image): macos-latest still defaults to Xcode 26, and the net11.0 iOS / Mac Catalyst packs
# the workloads ship are the 27.x ones.
runs-on: xcode-27
steps:
- name: Checkout
uses: actions/checkout@v7
# Both SDKs: global.json builds with 11, and the net10.0 test slice needs the 10 runtime.
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.x
11.0.100
workloads: maui-ios, maui-android, maui-maccatalyst, macos, wasm-tools
- name: Select Xcode 27.1
run: sudo xcode-select -s /Applications/Xcode_27.1.app/Contents/Developer && xcodebuild -version
- name: Build
run: dotnet build build.slnf /restore -m -property:Configuration=Release
# No --no-build: build.slnf deliberately excludes the test project, so the previous step never
# produced its output. xunit v3 runs on Microsoft.Testing.Platform, so trx comes from
# --report-trx (the VSTest "--logger trx" spelling is silently ignored here).
# TestingPlatformShowTestsFailure surfaces the failing test name, assertion and stack as MSBuild
# errors; without it the run reports only a count and points at a log file that lives on the
# runner, which makes a CI-only failure impossible to diagnose from the logs alone.
- name: Test
run: dotnet test tests/Shiny.Net.HttpServer.Tests/Shiny.Net.HttpServer.Tests.csproj --configuration Release -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false -- --report-trx --report-trx-filename test-results.trx
# always(): the point of these is the run where the Test step failed.
- name: Post Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: test-results
path: |
tests/**/TestResults/*.trx
tests/**/TestResults/*.log
retention-days: 5
if-no-files-found: warn
- name: Verify Native AOT
run: dotnet publish samples/Sample.Api/Sample.Api.csproj -r osx-arm64 --configuration Release
- name: Publish Artifacts
uses: actions/upload-artifact@v7
with:
name: nugets
path: |
src/**/bin/Release/*.nupkg
src/**/bin/Release/*.snupkg
retention-days: 5