Skip to content

GraphQL over HTTP client integration #1303

GraphQL over HTTP client integration

GraphQL over HTTP client integration #1303

name: iOS Device Tests
on:
push:
branches:
- main
- release/*
pull_request:
jobs:
build:
runs-on: macos-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
NO_ANDROID: true
NO_MACCATALYST: true
steps:
- name: Cancel Previous Runs
if: github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # Tag: 0.11.0
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build Cocoa SDK
uses: ./.github/actions/buildcocoasdk
- name: Install .NET Workloads
run: dotnet workload install maui-ios --temp-dir "${{ runner.temp }}" --from-rollback-file rollback.json
- name: Restore .NET Dependencies
run: dotnet restore test/Sentry.Maui.Device.TestApp --nologo
- name: Build iOS Test App
run: dotnet build test/Sentry.Maui.Device.TestApp -c Release -f net7.0-ios --no-restore --nologo
- name: Upload iOS Test App
uses: actions/upload-artifact@v3
with:
name: device-test-ios
if-no-files-found: error
path: test/Sentry.Maui.Device.TestApp/bin/Release/net7.0-ios/iossimulator-x64/Sentry.Maui.Device.TestApp.app
ios:
needs: [build]
name: Run iOS Tests
runs-on: macos-latest
strategy:
fail-fast: false
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download test app artifact
uses: actions/download-artifact@v3
with:
name: device-test-ios
path: bin/Sentry.Maui.Device.TestApp.app
- name: Install XHarness
run: dotnet tool install Microsoft.DotNet.XHarness.CLI --global --version "1.*-*"
- name: Run Tests
id: first-run
shell: bash +e {0}
run: >
xharness apple test \
--app=bin/Sentry.Maui.Device.TestApp.app \
--target=ios-simulator-64 \
--launch-timeout=00:10:00 \
--output-directory=./test_output \
; export exitcode=$? ; echo "exitcode=$exitcode" >> "$GITHUB_OUTPUT"
- name: Retry Tests (if previous failed to run)
if: steps.first-run.outputs.exitcode > 1
run: >
xharness apple test \
--app=bin/Sentry.Maui.Device.TestApp.app \
--target=ios-simulator-64 \
--launch-timeout=00:10:00 \
--output-directory=./test_output
- name: Create Test Report
if: success() || failure()
run: scripts/parse-xunit2-xml.ps1 @(gci ./test_output/*.xml)[0].FullName | Out-File $env:GITHUB_STEP_SUMMARY
shell: pwsh
- name: Upload results
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: device-test-ios-results
path: test_output