forked from Manuel/meeting-assistant
ci: validate portable tests on macos
This commit is contained in:
@@ -90,3 +90,61 @@ jobs:
|
||||
run: |
|
||||
find MeetingAssistant.Tests -type d -name TestResults -print || true
|
||||
find MeetingAssistant.Tests -type f -path "*/TestResults/*" -maxdepth 5 -print || true
|
||||
|
||||
macos-build-and-test:
|
||||
runs-on: macos
|
||||
env:
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
|
||||
DOTNET_NOLOGO: "1"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Verify native macOS runner
|
||||
run: |
|
||||
if [ "$(uname -s)" != "Darwin" ]; then
|
||||
echo "The macos job requires a native Gitea runner registered with the macos:host label."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v6
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Restore (portable target)
|
||||
run: |
|
||||
dotnet restore MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
|
||||
-p:EnableWindowsTargeting=true
|
||||
|
||||
- name: Build (portable target and macOS helpers)
|
||||
run: |
|
||||
dotnet build MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
|
||||
-c Release \
|
||||
-f net10.0 \
|
||||
--no-restore \
|
||||
-p:EnableWindowsTargeting=true \
|
||||
--nologo
|
||||
|
||||
- name: Verify macOS native helpers
|
||||
run: |
|
||||
test -x MeetingAssistant/bin/Release/net10.0/Native/MeetingAssistantAudioCapture.app/Contents/MacOS/macos-meeting-audio-capture
|
||||
test -x MeetingAssistant/bin/Release/net10.0/Native/macos-desktop-controls
|
||||
test -x MeetingAssistant/bin/Release/net10.0/Native/macos-meeting-integrations
|
||||
test -x MeetingAssistant/bin/Release/net10.0/Native/macos-meeting-assistant-launcher
|
||||
|
||||
- name: Run tests on macOS
|
||||
run: |
|
||||
dotnet test MeetingAssistant.Tests/MeetingAssistant.Tests.csproj \
|
||||
-c Release \
|
||||
-f net10.0 \
|
||||
--no-build \
|
||||
-p:EnableWindowsTargeting=true \
|
||||
--nologo
|
||||
|
||||
- name: Show test output folder on failure
|
||||
if: failure()
|
||||
run: |
|
||||
find MeetingAssistant.Tests -type d -name TestResults -print || true
|
||||
find MeetingAssistant.Tests -type f -path "*/TestResults/*" -maxdepth 5 -print || true
|
||||
|
||||
Reference in New Issue
Block a user