Skip to content

Commit 1060a11

Browse files
authored
Merge branch 'master' into gradient-buttons
2 parents f9543d4 + 6850e43 commit 1060a11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1611
-763
lines changed

.circleci/config.yml

Lines changed: 129 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,96 @@
1+
---
12
version: 2
23

34
x-config:
4-
- &restore-cache-yarn
5-
keys:
6-
- 'v2-dependencies-{{ checksum "yarn.lock" }}'
7-
- 'v2-dependencies-'
8-
- &save-cache-yarn
9-
paths: [~/.cache/yarn]
10-
key: 'v2-dependencies-{{ checksum "yarn.lock" }}'
5+
x-caching: # caching instructions
6+
- &save-cache-yarn
7+
key: 'v3-yarn-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}'
8+
paths: [~/.cache/yarn, ~/Library/Caches/Yarn]
9+
- &restore-cache-yarn
10+
key: 'v3-yarn-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}'
11+
- &save-cache-bundler
12+
key: 'v2-ruby-dependencies-{{ arch }}-{{ checksum "Gemfile.lock" }}'
13+
paths: [./vendor/bundle]
14+
- &restore-cache-bundler
15+
key: 'v2-ruby-dependencies-{{ arch }}-{{ checksum "Gemfile.lock" }}'
16+
- &save-cache-gradle
17+
key: 'v1-gradle-dependencies-{{ arch }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}-{{ checksum "node_modules/react-native/package.json" }}'
18+
paths: [~/.gradle]
19+
- &restore-cache-gradle
20+
key: 'v1-gradle-dependencies-{{ arch }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}-{{ checksum "node_modules/react-native/package.json" }}'
21+
x-commands: # command shorthands
22+
- &set-ruby-version
23+
name: Set Ruby Version
24+
command: echo "ruby-2.4.2" > ~/.ruby-version
25+
- &run-danger
26+
command: yarn run danger --id $task
27+
when: always
1128

1229
workflows:
1330
version: 2
1431
analyze:
1532
jobs:
16-
- danger
17-
- flow
18-
- jest
19-
- prettier
20-
- eslint
21-
- data
33+
- cache-yarn-linux
34+
- danger: {requires: [cache-yarn-linux]}
35+
- flow: {requires: [cache-yarn-linux]}
36+
- jest: {requires: [cache-yarn-linux]}
37+
- prettier: {requires: [cache-yarn-linux]}
38+
- eslint: {requires: [cache-yarn-linux]}
39+
- data: {requires: [cache-yarn-linux]}
40+
- ios: {requires: [danger, flow, jest, prettier, eslint, data]}
41+
- android: {requires: [danger, flow, jest, prettier, eslint, data]}
2242

2343
jobs:
44+
cache-yarn-linux:
45+
docker: [{image: 'circleci/node:8'}]
46+
steps:
47+
- checkout
48+
- restore_cache: *restore-cache-yarn
49+
- run: yarn install --frozen-lockfile
50+
- run: yarn --version
51+
- save_cache: *save-cache-yarn
52+
2453
danger:
2554
docker: [{image: 'circleci/node:8'}]
26-
environment: {task: JS-general}
55+
environment:
56+
task: JS-general
2757
steps:
2858
- checkout
2959
- restore_cache: *restore-cache-yarn
30-
- run: yarn install
60+
- run: yarn install --frozen-lockfile
3161
- save_cache: *save-cache-yarn
32-
- run: yarn run danger --id $task
62+
- run: *run-danger
3363

3464
flow:
3565
docker: [{image: 'circleci/node:8'}]
36-
environment: {task: JS-flow}
66+
environment:
67+
task: JS-flow
3768
steps:
3869
- checkout
3970
- restore_cache: *restore-cache-yarn
40-
- run: yarn install
71+
- run: yarn install --frozen-lockfile
4172
- save_cache: *save-cache-yarn
4273
- run: mkdir -p logs/
4374
- run: yarn run bundle-data
4475
- run: yarn run --silent flow check --quiet | tee logs/flow
45-
- run: yarn run danger --id $task
76+
- run: *run-danger
4677

4778
jest:
4879
docker: [{image: 'circleci/node:8'}]
49-
environment: {task: JS-jest}
80+
environment:
81+
task: JS-jest
82+
JEST_JUNIT_OUTPUT: ./test-results/jest/junit.xml
5083
steps:
5184
- checkout
5285
- restore_cache: *restore-cache-yarn
53-
- run: yarn install
86+
- run: yarn install --frozen-lockfile
5487
- save_cache: *save-cache-yarn
55-
- run: mkdir -p logs/
88+
- run: mkdir -p logs/ test-results/jest/
5689
- run: yarn run bundle-data
57-
- run: yarn run --silent test --coverage 2>&1 | tee logs/jest
58-
- run: yarn run danger --id $task
90+
- run: yarn run --silent test --coverage --testResultsProcessor="jest-junit" 2>&1 | tee logs/jest
91+
- run: *run-danger
92+
- store_test_results:
93+
path: ./test-results
5994
- run: yarn global add coveralls
6095
- run:
6196
name: coveralls
@@ -67,11 +102,12 @@ jobs:
67102
68103
prettier:
69104
docker: [{image: 'circleci/node:8'}]
70-
environment: {task: JS-prettier}
105+
environment:
106+
task: JS-prettier
71107
steps:
72108
- checkout
73109
- restore_cache: *restore-cache-yarn
74-
- run: yarn install
110+
- run: yarn install --frozen-lockfile
75111
- save_cache: *save-cache-yarn
76112
- run: mkdir -p logs/
77113
- run: yarn run prettier
@@ -82,30 +118,89 @@ jobs:
82118
if ! git diff --quiet *.js source/ scripts/; then
83119
git diff *.js source/ scripts/ | tee logs/prettier
84120
fi
85-
- run: yarn run danger --id $task
121+
- run: *run-danger
86122

87123
eslint:
88124
docker: [{image: 'circleci/node:8'}]
89-
environment: {task: JS-lint}
125+
environment:
126+
task: JS-lint
90127
steps:
91128
- checkout
92129
- restore_cache: *restore-cache-yarn
93-
- run: yarn install
130+
- run: yarn install --frozen-lockfile
94131
- save_cache: *save-cache-yarn
95-
- run: mkdir -p logs/
132+
- run: mkdir -p logs/ test-results/eslint/
96133
- run: yarn run bundle-data
97134
- run: yarn run --silent lint | tee logs/eslint
98-
- run: yarn run danger --id $task
135+
- run: yarn run --silent lint --format junit > test-results/eslint/junit.xml
136+
- run: *run-danger
137+
- store_test_results:
138+
path: ./test-results
99139

100140
data:
101141
docker: [{image: 'circleci/node:8'}]
102-
environment: {task: JS-data}
142+
environment:
143+
task: JS-data
103144
steps:
104145
- checkout
105146
- restore_cache: *restore-cache-yarn
106-
- run: yarn install
147+
- run: yarn install --frozen-lockfile
107148
- save_cache: *save-cache-yarn
108149
- run: mkdir -p logs/
109150
- run: yarn run --silent validate-data --quiet | tee logs/validate-data
110151
- run: yarn run --silent validate-bus-data | tee logs/validate-bus-data
111-
- run: yarn run danger --id $task
152+
- run: *run-danger
153+
154+
android:
155+
docker: [{image: 'circleci/android:api-27-node8-alpha'}]
156+
environment:
157+
task: ANDROID
158+
FASTLANE_SKIP_UPDATE_CHECK: '1'
159+
FASTLANE_DISABLE_ANIMATION: '1'
160+
steps:
161+
- checkout
162+
- run: yarn --version
163+
- run: *set-ruby-version
164+
- restore_cache: *restore-cache-yarn
165+
- run: yarn install --frozen-lockfile
166+
- save_cache: *save-cache-yarn
167+
- restore_cache: *restore-cache-bundler
168+
- run: bundle check || bundle install --frozen --path ./vendor/bundle
169+
- save_cache: *save-cache-bundler
170+
- restore_cache: *restore-cache-gradle
171+
- run:
172+
name: Download Android dependencies
173+
command: cd android && ./gradlew androidDependencies
174+
environment: {TERM: xterm-256color}
175+
- save_cache: *save-cache-gradle
176+
- run: mkdir -p logs/
177+
- run: touch .env.js
178+
- run: bundle exec fastlane android ci-run | tee ./logs/build
179+
- run: *run-danger
180+
181+
ios:
182+
macos: {xcode: '9.0'}
183+
environment:
184+
task: IOS
185+
FASTLANE_SKIP_UPDATE_CHECK: '1'
186+
FASTLANE_DISABLE_ANIMATION: '1'
187+
LC_ALL: en_US.UTF-8
188+
LANG: en_US.UTF-8
189+
shell: /bin/bash --login -o pipefail
190+
steps:
191+
- checkout
192+
- run: yarn --version
193+
- run: *set-ruby-version
194+
- restore_cache: *restore-cache-yarn
195+
- run: yarn install --frozen-lockfile
196+
- save_cache: *save-cache-yarn
197+
- restore_cache: *restore-cache-bundler
198+
- run: bundle check || bundle install --frozen --path ./vendor/bundle
199+
- save_cache: *save-cache-bundler
200+
- run: mkdir -p logs/
201+
- run: touch .env.js
202+
- run: bundle exec fastlane ios ci-run | tee ./logs/build
203+
- run:
204+
name: Analyze Fastlane Logfile
205+
command: python2 ./scripts/analyze-gym.py -s 20 < ./logs/build | tee ./logs/analysis || true
206+
- run: *run-danger

.codeclimate.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.csslintrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ rules:
7171

7272
# react rules – https://github.com/yannickcr/eslint-plugin-react
7373
react/display-name: off
74+
react/jsx-curly-brace-presence: [warn, never]
7475
react/jsx-key: warn
7576
react/jsx-no-bind:
7677
- warn
@@ -89,11 +90,11 @@ rules:
8990
react/sort-comp:
9091
- warn
9192
- order:
92-
- static-methods
93-
- type-annotations
94-
- lifecycle
95-
- everything-else
96-
- render
93+
- static-methods
94+
- type-annotations
95+
- lifecycle
96+
- everything-else
97+
- render
9798
react/sort-prop-types: warn
9899
react/wrap-multilines: off
99100
react/jsx-boolean-value: [error, always]

.flowconfig

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,9 @@
55
; Ignore "BUCK" generated dirs
66
<PROJECT_ROOT>/\.buckd/
77

8-
; Ignore unexpected extra "@providesModule"
9-
.*/node_modules/.*/node_modules/fbjs/.*
10-
118
; Ignore the vendor/ folder, since CIs appear to stick ruby deps in there
129
<PROJECT_ROOT>/vendor/
13-
14-
; Ignore duplicate module providers
15-
; For RN Apps installed via npm, "Libraries" folder is inside
16-
; "node_modules/react-native" but in the source repo it is in the root
17-
.*/Libraries/react-native/React.js
10+
<PROJECT_ROOT>/.bundle/
1811

1912
; Ignore polyfills
2013
.*/Libraries/polyfills/.*
@@ -57,12 +50,12 @@ suppress_type=$FlowFixMeProps
5750
suppress_type=$FlowFixMeState
5851
suppress_type=$FixMe
5952

60-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
61-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
53+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(6[0-1]\\|[1-5][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
54+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(6[0-1]\\|[1-5][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
6255
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6356
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6457

6558
unsafe.enable_getters_and_setters=true
6659

6760
[version]
68-
^0.57.0
61+
^0.61.0

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/package.json
2+
*.md
3+
*.json
4+
/flow-typed/
5+
/node_modules/
6+
/docs/
7+
/android/
8+
/ios/

0 commit comments

Comments
 (0)