Skip to content

Commit

Permalink
Automate testing via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
2kai2kai2 committed Jun 23, 2023
1 parent 2a8d043 commit 392fda2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ios-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: ios-tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-tests-iphone-13-ios-14-1:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Test
run: xcodebuild test -workspace apps/ios/GuideDogs.xcworkspace -scheme Soundscape -testPlan UnitTests -destination 'platform=iOS Simulator,name=iPhone 13,OS=14.1'
3 changes: 2 additions & 1 deletion docs/ios-client/build-and-test/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Note that this file may only be relevant to the default `Soundscape` scheme (not

## Running Tests
### Running Tests via GitHub Actions
*This is currently planned but not yet implemented.*
GitHub Runners should run the iOS tests on each *push* or *pull request* to `main`.
This is configured in `.github/workflows/ios-tests.yml`

### Manually Running Tests
To manually run tests in XCode, go to **Product****Test** (`⌘U`) or click and hold down the run button to show more options and select **Test**. This will build the project and run the test plan.
Expand Down
13 changes: 8 additions & 5 deletions docs/ios-client/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ Download Xcode from the [App Store](https://apps.apple.com/us/app/xcode/id497799

## Install Xcode Command Line Tools

Open Xcode and you should be prompted with installing the command line tools, or run this in a Terminal window:
Open Xcode and you should be prompted with installing the command line tools, or run this in a Terminal window:

```sh
xcode-select --install
```

## Install Ruby

_Note:_ while macOS comes with a version of Ruby installed, you should install and use a non-system [Ruby](https://www.ruby-lang.org/)
using a version manager like [RVM](https://rvm.io/)

## Install CocoaPods and CocoaPods-Patch

Soundscape uses [CocoaPods](https://cocoapods.org/) as a dependency managers along with [Swift Package Manager](https://www.swift.org/package-manager/), and [CocoaPods-Patch](https://github.com/DoubleSymmetry/cocoapods-patch) to add changes to a third party CocoaPods framework.

_Note:_ before the next step, make sure you have [Ruby](https://www.ruby-lang.org/) installed on your machine.

In the iOS project folder, run the following command to install the dependencies from the `Gemfile`:

```sh
Expand All @@ -40,7 +43,7 @@ bundle install

## Install CocoaPods Dependencies

Install the CocoaPods dependencies by running the following command in Terminal:
Install the CocoaPods dependencies by running the following command in Terminal from the iOS project folder:

```sh
pod install
Expand Down Expand Up @@ -76,7 +79,7 @@ Soundscape uses a backend service to download map tiles and other information. I

## Building and Running

At this point, you should be able to build and run the `Soundsacpe` target on an iOS simulator. In order to run the app on a real device, you will need to add your Apple Developer account signing info in the _Signing & Capabilities_ section of the project settings.
At this point, you should be able to build and run the `Soundscape` target on an iOS simulator. In order to run the app on a real device, you will need to add your Apple Developer account signing info in the _Signing & Capabilities_ section of the project settings.

## Additional Personalization

Expand Down

0 comments on commit 392fda2

Please sign in to comment.