Skip to content

Commit

Permalink
Added sylph config details and added CI config section
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcc007 committed Aug 4, 2019
1 parent a786db7 commit c0f85e9
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 10 deletions.
84 changes: 74 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ project_name: flutter tests
default_job_timeout: 5 # minutes

tmp_dir: /tmp/sylph
artifacts_dir: /tmp/sylph_artifacts

# local timeout per device farm run
sylph_timeout: 720 # seconds approx
# run on ios and android pools concurrently (for faster results)
concurrent_runs: true

device_pools:

Expand All @@ -35,41 +41,99 @@ device_pools:
devices:
- name: Samsung Galaxy S9 (Unlocked)
model: SM-G960U1
os: 8.0.0
os: '8.0.0'

- pool_name: ios pool 1
pool_type: ios
devices:
- name: Apple iPhone X
model: A1865
os: 12.0
os: '12.0'

test_suites:

- test_suite: example tests 1
main: test_driver/main1.dart
testspec: test_driver/test_spec.yaml
tests:
- test_driver/main1_test1.dart
- test_driver/main1_test2.dart
device_pools:
- android pool 1
# - ios pool 1
job_timeout: 5 # minutes
- ios pool 1
job_timeout: 5 # minutes per each device run

- test_suite: example tests 2
main: test_driver/main2.dart
testspec: test_driver/test_spec.yaml
tests:
- test_driver/main2_test1.dart
- test_driver/main2_test2.dart
device_pools:
pool_names:
- android pool 1
# - ios pool 1
job_timeout: 5 # minutes
- ios pool 1
job_timeout: 5 # minutes per each device run
```
# Dependencies
## AWS CLI
Install AWS Command Line Interface (AWS CLI)
```
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
```
For alternative install options see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html

## AWS CLI Credentials
Configure the AWS CLI credentials:
```
$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
```
For alternative configuration options see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html

# Configuring a CI Environment for _Sylph_

## iOS builds
Special handling for building iOS apps is required for running tests on remote real devices. In particular, provisioning profiles and certificates must be installed on the build machine. To install the dependencies needed to complete the iOS build, Fastlane's match is used. _Sylph_ will detect it is running in a CI environment (using the CI environment variable), and will install fastlane files that in turn will install the dependencies needed to build the iOS app using Fastlane's match. The iOS build can then complete as normal.

The following environment variable is required my Match:


- PUBLISHING_MATCH_CERTIFICATE_REPO
This is the location of the private match repo. For example, https://matchusername:[email protected]/private_repos/match
where
- matchusername
is the username used when setting-up match
- matchpassword
is the password used when setting-up match
- private.mycompany.com/private_repos/match
is the uri path to the match repo (if using git)

For details on how to configure Match see:
https://docs.fastlane.tools/actions/match/

## AWS CLI Credentials for CI
The following AWS CLI credentials are required:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY

For details on other credentials see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html

## Example secrets for Travis-CI
_Sylph_ runs on Travis-CI and expects the following environment variables:

![secret variables](art/travis_env_vars.png)



# Live demo
To see _Sylph_ in action, a live demo of the [example](example) app is available.
To see _Sylph_ in action in a CI environment, a demo of the [example](example) app is available.

The log of the live run is here:
https://travis-ci.com/mmcc007/sylph
Expand Down
Binary file added art/travis_env_vars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c0f85e9

Please sign in to comment.