Skip to content

Commit 070105f

Browse files
committed
Merge branch 'master' into greenkeeper/react-native-0.52.0
* master: (130 commits) fix onChangeOrder/onSaveOrder typo shuffle around the types prettierify fix schema (add button enabled key) comment out the facilities form idea allow passing a custom message to explain why the tool is disabled prettify validate.js update <Button/> snapshots add pretty-quick and replace prettier:changed with it allow passing false to <Card header footer /> make buttons actually disable when disabled extract Button props fix too-common [object Object] stuff in validate-data fix overzealous catching of errors in validate-data script fix accidental duplicate momentjs inclusion clean up the flowconfig clean up tool code duplication and allow configuring basic tools from schema return local copy of help data when offline + no cache, or in dev update magical powers of help tool files and write a schema allow international phone numbers in _defs#/phone ... # Conflicts: # package.json # yarn.lock
2 parents ac68401 + dfc041a commit 070105f

Some content is hidden

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

53 files changed

+1423
-617
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.

.flowconfig

Lines changed: 1 addition & 8 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/.*

.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/

.travis.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@ env:
22
# To update the secure tokens, run `travis encrypt NAME='VALUE' --add` after
33
# installing the travis gem with `gem install travis`.
44
global:
5-
# `match` keychain info – the values don't matter, they're defined
6-
# here so they're consistent throughout
7-
- MATCH_KEYCHAIN_NAME=travis-ios-keychain
8-
- MATCH_KEYCHAIN_PASSWORD=alpine
9-
# dirty hack for https://github.com/travis-ci/travis-ci/issues/5092
10-
- PATH=${PATH/\.\/node_modules\/\.bin/}
5+
# variables from the web interface:
6+
# - BOT_ITC_PASSWORD_FOR_FASTLANE
7+
# - BUGSNAG_KEY: api key for Bugsnag connection
8+
# - CI_USER_TOKEN: unknown
9+
# - DANGER_GITHUB_API_TOKEN: api key to let Danger write comments to github
10+
# - FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: app-specific password for the iTMS Transporter (obselete)
11+
# - FASTLANE_PASSWORD: password for apple id used by fastlane
12+
# - FASTLANE_SESSION: if fastlane's apple ID has 2fa enabled, this is the 1-month 2fa session cookie
13+
# - GCAL_KEY: google calendar API key
14+
# - GH_TOKEN: unknown
15+
# - GITHUB_PAGES_TOKEN: token to push to gh-pages
16+
# - GMAPS_KEY: google maps API key
1117
# sets our node version in one nice place
1218
- TRAVIS_NODE_VERSION=8
1319
# set the ruby version up top
1420
- TRAVIS_RUBY_VERSION=ruby-2.4.2
15-
# GH_TOKEN:
16-
# - used by greenkeeper to update package-lock.json
21+
# configure fastlane a bit
22+
- FASTLANE_SKIP_UPDATE_CHECK=1
23+
- FASTLANE_DISABLE_ANIMATION=1
24+
# bypass the 2fa auth for fastlane
25+
- FASTLANE_PASSWORD="$BOT_ITC_PASSWORD_FOR_FASTLANE"
26+
# this is `GH_TOKEN`: used by greenkeeper to update package-lock.json
1727
- secure: s2HicpDrioxVuS/1KyDMgFkgbM3eVxp1FVF1R922oKeUGhtNFERufXp+nXaG98trqmJhfjfx243i7qP8oEX1DoGtFAHAuILBG0KTXoY1HZG/ZlVpc2pjRQmfCt3tJCs8Trovv2q2yM21JtTKXJ6wZ+XUGK0zqXbd4IH7k30Q649CIZ+l/pcU4cVqoLojekFWMQuW9onPOiTGtBckdPngmJ9GgAGDQesYjZ/p5RTaggCleD4oFmgkUdPZtityr+6TYe6cU9fFIVHyxe5F4JsiXB2aKk0qbX86tXUdlneOTYAw0YsxzVbpjtjVeedG3lm+UDAABznaqyuj4EI2+ERIXEMXtDzG+knQuQIF1P9E5ZWRanuSbfwFRJecPXyw03AtT+lBEHls1klRFep0yYzSKPunuqyeFZG+QFFtiegPnk7C4R2KfJhghB8kr8Ysgwg1YJXP77AaTBET0YsEvhMNNqEGK0LsXhZJUCWUnZfINFwp8ggEB8ZHWqWmTD2SxufqWXCzcMBnNdyuoDAH8//myA/09UcxzRpQwBqy3wH/Nlb47n+RydQxxiSmpTw0xAa5f9/qRjy0DrIT0PowDN1VGLgy6wQIqzAN6Ex4Y7AIyaTZrga7cbpfHE7lKee8XTTfDJnfGywJ1+3CqpZpA1jQhRzeGQbxPfghaOxzI46i4p4=
1828

1929

@@ -32,7 +42,8 @@ stages:
3242
if: branch =~ ^greenkeeper\/
3343
- name: Deploy Data
3444
if: branch = master AND type != pull_request
35-
- name: Build + Deploy App
45+
- name: Build + Deploy
46+
if: type = cron OR tag IS present
3647

3748

3849
#
@@ -42,6 +53,13 @@ stages:
4253
x-definitions:
4354
- &base
4455
before_install:
56+
# dirty hack for https://github.com/travis-ci/travis-ci/issues/5092
57+
- export PATH="${PATH/\.\/node_modules\/\.bin/}"
58+
59+
# finish bypassing 2fa auth for fastlane
60+
- unset FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
61+
- unset FASTLANE_SESSION
62+
4563
# print some travis debugging info
4664
- echo "Now testing on $TRAVIS_OS_NAME"
4765
- echo "Travis branch is $TRAVIS_BRANCH"
@@ -160,6 +178,7 @@ jobs:
160178
script:
161179
- bundle exec fastlane ios ci-run | tee ./logs/build
162180
- python2 ./scripts/analyze-gym.py -s 20 < ./logs/build | tee ./logs/analysis || true
181+
- bundle exec fastlane ios refresh_dsyms
163182

164183
cache:
165184
bundler: true

0 commit comments

Comments
 (0)