Skip to content

unit-tests

unit-tests #472

Workflow file for this run

# workflow runs on successful completion of the build workflow, or when manually run
name: unit-tests
on:
workflow_run:
workflows: ["build"]
types: [completed]
workflow_dispatch:
jobs:
unit-tests:
name: Unit Tests
runs-on: macos-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "MarkersExtractor-Package" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]}
# xcodebuild test reference:
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html