This sample iOS application includes a basic CI pipeline demonstrating how to build and test an iOS app with Semaphore CI. This project requires Xcode 11.1 and is written in Swift 5.1 using SwiftUI.
To run the sample application locally in Xcode, clone this repository and open TallestTowers.xcodeproj
. Then, select an installed simulator and choose "Run" from the "Product" menu or press ⌘R.
The project also has both unit, and UI tests. To run all tests locally, choose "Test" from the "Product" menu or press ⌘U.
To run the sample application on a real device you will need to configure the Xcode project to use your development team. Open TallestTowers.xcodeproj
and set the development team for each of the TallestTowers
, TallestTowersTests
, and TallestTowersUITests
targets as follows:
- Select the
TallestTowers
project in the Project navigator. - Switch to the "Signing & Capabilities" tab.
- Select each target in turn and select a valid development team in the "Signing" settings.
To test the CI pipeline, you will need fastlane installed on your local machine. A sample Fastfile
has been included in this project which is configured to:
- Build the app with
gym
. - Run the unit and UI tests.
To run the CI pipeline, execute the following commands from the project directory in Terminal:
bundle install --path vendor/gems
bundle exec fastlane build
bundle exec fastlane test
To run the CI for this sample app on Semaphore, fork this repository and add it as a new project from your Semaphore dashboard.
Semaphore pipelines are made up of blocks executed in sequence that are configured in a .semaphore/semaphore.yml
file in the root of your project. The pipeline configuration for this sample project is fully commented, and has been configured to build the application and then run tests.
This sample Semaphore configuration uses an a1-standard-4
machine running macOS Mojave with Xcode 11.1, fastlane and other build tools pre-installed. Other, larger machine types are available if needed.
For more information on the full cabilities of the semaphore.yml
configuration file, see the documentation.
Important Note: If you receive the error message "Selected machine type is not available in this organization" after setting up this sample project on Semaphore, ensure your account is on the Semaphore Pro plan. A 14 day free trial of this plan is available from your dashboard.
Copyright ©2019 Rendered Text – Distributed under the MIT License. See the LICENSE for full terms.