-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
72 lines (70 loc) · 2.28 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: 2
jobs:
build:
working_directory: ~/reactnativedemo
# primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
- image: circleci/node:9.2.1
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install node_modules with npm
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Set Ruby Version
command: echo "ruby-2.4.2" > ~/.ruby-version
- run: sudo gem install bundler
- run: sudo bundle install
- run: bash -c 'echo -e ".bashrc\n.bash_profile\n.zshrc\n.config/fish/config.fish" | while read f; do if [ -f $HOME/$f ]; then echo -e "export LC_ALL=en_US.UTF-8\nexport LANG=en_US.UTF-8" >> $HOME/$f; fi; done'
- run:
name: Fastlane
command: bundle exec fastlane dev
android:
working_directory: ~/reactnativedemo/android
docker:
- image: circleci/android:api-27-node8-alpha
steps:
- checkout:
path: ~/project
- attach_workspace:
at: ~/project
- run: bundle install
- run: bundle exec fastlane test
- store_test_results:
path: ~/reactnativedemo/android/reports
ios:
macos:
xcode: "9.0"
working_directory: ~/reactnativedemo/ios
environment:
FL_OUTPUT_DIR: ~/reactnativedemo/output
shell: /bin/bash --login -o pipefail
steps:
- checkout:
path: ~/reactnativedemo/
- run:
name: Set Ruby Version
command: echo "ruby-2.4" > ~/.ruby-version
# Not using a workspace here as Node and Yarn versions
# differ between the macOS image and the Docker containers above.
- run: npm install
- run: bundle install
- run: bundle exec fastlane test
- run:
command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml
when: always
- store_artifacts:
path: ~/reactnativedemo/output
- store_test_results:
path: ~/reactnativedemo/output/scan
workflows:
version: 2
test_release:
jobs:
- build