Skip to content

Add comprehensive unit tests #12

Add comprehensive unit tests

Add comprehensive unit tests #12

Workflow file for this run

name: Build & Test
on:
pull_request:
branches:
- main
merge_group:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
macos-unit-tests:
name: macOS Build & Test
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run unit tests (macOS)
run: |
xcodebuild test \
-project ComputerSolitaire.xcodeproj \
-scheme ComputerSolitaire \
-configuration Debug \
-destination "platform=macOS" \
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
-resultBundlePath "$RUNNER_TEMP/ComputerSolitaireTests.xcresult" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO
- name: Upload test result bundle on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos-test-results
path: ${{ runner.temp }}/ComputerSolitaireTests.xcresult
ios-build:
name: iOS Build
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build app (iOS Simulator)
run: |
xcodebuild build \
-project ComputerSolitaire.xcodeproj \
-scheme ComputerSolitaire \
-configuration Debug \
-destination "generic/platform=iOS Simulator" \
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO