Skip to content

Updated documentation #105

Updated documentation

Updated documentation #105

Workflow file for this run

name: Unit Tests
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
defaults:
run:
shell: zsh {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
SCHEME: "BlackBox"
jobs:
unit-tests-spm:
runs-on: 'macos-13'
timeout-minutes: 10
strategy:
matrix:
DESTINATION: ["platform=iOS Simulator,name=iPhone 11", "platform=OS X", "platform=tvOS Simulator,name=Apple TV", "platform=watchOS Simulator,name=Apple Watch Ultra (49mm)"]
steps:
- name: Get source code
uses: actions/checkout@v3
- name: Prepare Environment for App Build
uses: ./.github/actions/prepare_env_app_build
- name: Build
run: >
xcodebuild build-for-testing
-scheme ${{ env.SCHEME }}
-destination '${{ matrix.DESTINATION }}'
-quiet
- name: Test
run: >
xcodebuild test
-scheme ${{ env.SCHEME }}
-destination '${{ matrix.DESTINATION }}'
-resultBundlePath "${{ env.SCHEME }}-${{ matrix.DESTINATION }}"
-quiet
- name: Report
uses: kishikawakatsumi/xcresulttool@v1
with:
path: "${{ env.SCHEME }}-${{ matrix.DESTINATION }}.xcresult"
title: "Xcode test results | ${{ matrix.DESTINATION }}"
if: success() || failure()
# This allows us to have a branch protection rule for tests and deploys with matrix
status-for-matrix:
runs-on: 'macos-latest'
needs: unit-tests-spm
if: always()
steps:
- name: Successful deploy
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing deploy
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1