Skip to content

Commit

Permalink
add section to readme for running tests, add toc to readme, add githu…
Browse files Browse the repository at this point in the history
…b actions workflow

add missing newline at eof

move pull request into right directory
  • Loading branch information
GrayedFox committed Sep 23, 2021
1 parent 58dc248 commit b3d2e99
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pull-request-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Swift Integration Tests

on:
push:
branches:
- master
pull-request:

jobs:
test:
name: Test
runs-on: macos-latest
strategy:
matrix:
destination: ['platform=iOS Simulator,OS=latest,name=iPhone 12 Pro Max']

steps:
- name: Checkout Code
- uses: actions/checkout@v2

- name: Build and Test
run: xcodebuild test -project FantasmoSDK.xcodeproj -scheme FantasmoSDKTests -destination "${destination}"
env:
destination: ${{ matrix.destination }}
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- *generated with [DocToc](https://github.com/thlorenz/doctoc)* -->

- [Fantasmo-iOS-SDK](#fantasmo-ios-sdk)
- [Overview](#overview)
- [Installation](#installation)
- [CocoaPods (iOS 11+)](#cocoapods-ios-11)
- [Carthage (iOS 8+, OS X 10.9+)](#carthage-ios-8-os-x-109)
- [Importing](#importing)
- [Requirements](#requirements)
- [Functionality](#functionality)
- [Localization](#localization)
- [Anchors](#anchors)
- [Semantic Zones](#semantic-zones)
- [Usage](#usage)
- [Quick Start](#quick-start)
- [Initialization](#initialization)
- [Delegation](#delegation)
- [Localizing](#localizing)
- [Behaviors](#behaviors)
- [Anchors](#anchors-1)
- [Radius Check](#radius-check)
- [Simulation Mode](#simulation-mode)
- [Logging](#logging)
- [Overrides](#overrides)
- [Testing](#testing)
- [Running Tests](#running-tests)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# Fantasmo-iOS-SDK

## Overview
Expand Down Expand Up @@ -302,3 +333,17 @@ For _internal development_ testing and demo builds, the API server URL can be sp

key: FM_API_BASE_URL
value: 192:168:0:1:8090/v1/image.localize

## Testing

### Running Tests

To run unit tests from the command line use the following command:

`xcodebuild test -project FantasmoSDK.xcodeproj -scheme FantasmoSDKTests -destination 'platform=iOS Simulator,OS=latest,name=iPhone 12 Pro Max'`

If you would like to see the neatly formatted version that appears in the GitHub actions log pipe the output into xcpretty (you will need to install xcpretty seperately):

`xcodebuild test -project FantasmoSDK.xcodeproj -scheme FantasmoSDKTests -destination 'platform=iOS Simulator,OS=latest,name=iPhone 12 Pro Max' | xcpretty`

You can specify multiple target OS and device names to run against if so desired.

0 comments on commit b3d2e99

Please sign in to comment.