-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
9,399 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,155 +1,68 @@ | ||
version: 2 | ||
jobs: | ||
node: | ||
working_directory: ~/react-native-purchases | ||
docker: | ||
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} | ||
|
||
- restore_cache: | ||
key: node-v1-{{ checksum "package.json" }}-{{ arch }} | ||
|
||
- run: yarn install | ||
|
||
- save_cache: | ||
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} | ||
paths: | ||
- ~/.cache/yarn | ||
|
||
- save_cache: | ||
key: node-v1-{{ checksum "package.json" }}-{{ arch }} | ||
paths: | ||
- node_modules | ||
|
||
- run: | ||
name: jest tests | ||
command: | | ||
mkdir -p test-results/jest | ||
yarn run test | ||
environment: | ||
JEST_JUNIT_OUTPUT: test-results/jest/junit.xml | ||
|
||
- persist_to_workspace: | ||
root: ~/demo-react-native | ||
paths: | ||
- node_modules | ||
|
||
- store_test_results: | ||
path: test-results | ||
|
||
- store_artifacts: | ||
path: test-results | ||
|
||
android: | ||
working_directory: ~/react-native-purchases/android | ||
docker: | ||
- image: circleci/android:api-27-node8-alpha | ||
steps: | ||
- checkout: | ||
path: ~/react-native-purchases | ||
|
||
- attach_workspace: | ||
at: ~/react-native-purchases | ||
|
||
- restore_cache: | ||
key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} | ||
|
||
- run: bundle install | ||
|
||
- save_cache: | ||
key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} | ||
paths: | ||
- vendor/bundle | ||
|
||
- run: | ||
name: fastlane tests | ||
command: | | ||
mkdir -p test-results/fastlane | ||
bundle exec fastlane test | ||
mv fastlane/report.xml test-results/fastlane | ||
- store_test_results: | ||
path: test-results | ||
|
||
- store_artifacts: | ||
path: test-results | ||
|
||
ios: | ||
macos: | ||
xcode: "9.0" | ||
working_directory: ~/react-native-purchases | ||
|
||
# use a --login shell so our "set Ruby version" command gets picked up for later steps | ||
shell: /bin/bash --login -o pipefail | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: set Ruby version | ||
command: echo "ruby-2.4" > ~/.ruby-version | ||
|
||
- restore_cache: | ||
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} | ||
|
||
- restore_cache: | ||
key: node-v1-{{ checksum "package.json" }}-{{ arch }} | ||
|
||
# not using a workspace here as Node and Yarn versions | ||
# differ between our macOS executor image and the Docker containers above | ||
- run: yarn install | ||
|
||
- save_cache: | ||
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} | ||
paths: | ||
- ~/.cache/yarn | ||
|
||
- save_cache: | ||
key: node-v1-{{ checksum "package.json" }}-{{ arch }} | ||
paths: | ||
- node_modules | ||
|
||
- restore_cache: | ||
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} | ||
|
||
- run: | ||
command: bundle install | ||
working_directory: ios | ||
|
||
- save_cache: | ||
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} | ||
paths: | ||
- vendor/bundle | ||
|
||
- run: | ||
command: bundle exec fastlane test | ||
working_directory: ios | ||
|
||
- run: | ||
name: set up test results | ||
working_directory: ios | ||
when: always | ||
command: | | ||
mkdir -p test-results/fastlane test-results/xcode | ||
mv fastlane/report.xml test-results/fastlane | ||
mv fastlane/test_output/report.junit test-results/xcode/junit.xml | ||
- store_test_results: | ||
path: ios/test-results | ||
|
||
- store_artifacts: | ||
path: ios/test-results | ||
|
||
setup: | ||
working_directory: ~/react-native-purchases | ||
docker: | ||
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
- run: yarn run setup | ||
android: | ||
working_directory: ~/react-native-purchases | ||
docker: | ||
- image: circleci/android:api-27-node8-alpha | ||
steps: | ||
- checkout | ||
- run: | ||
name: yarn run setup | ||
command: yarn run setup | ||
- run: | ||
name: Android compiles | ||
command: ./gradlew build | ||
working_directory: example/android | ||
ios: | ||
macos: | ||
xcode: "9.0" | ||
working_directory: ~/react-native-purchases | ||
# use a --login shell so our "set Ruby version" command gets picked up for later steps | ||
shell: /bin/bash --login -o pipefail | ||
steps: | ||
- checkout | ||
- run: | ||
name: set Ruby version | ||
command: echo "ruby-2.4" > ~/.ruby-version | ||
- run: yarn run setup | ||
- restore_cache: | ||
key: bundle-v1-{{ checksum "example/ios/Gemfile.lock" }}-{{ arch }} | ||
- run: | ||
command: bundle install | ||
working_directory: example/ios | ||
|
||
- save_cache: | ||
key: bundle-v1-{{ checksum "example/ios/Gemfile.lock" }}-{{ arch }} | ||
paths: | ||
- vendor/bundle | ||
|
||
- run: | ||
command: bundle exec fastlane scan --scheme ReactNativeSample | ||
working_directory: example/ios | ||
|
||
- run: | ||
name: set up test results | ||
working_directory: example/ios | ||
when: always | ||
command: | | ||
mkdir -p test-results/fastlane test-results/xcode | ||
mv fastlane/report.xml test-results/fastlane | ||
mv fastlane/test_output/report.junit test-results/xcode/junit.xml | ||
- store_test_results: | ||
path: example/ios/test-results | ||
|
||
- store_artifacts: | ||
path: example/ios/test-results | ||
workflows: | ||
version: 2 | ||
node-android-ios: | ||
jobs: | ||
- node | ||
- android: | ||
requires: | ||
- node | ||
- ios: | ||
requires: | ||
- node | ||
- android | ||
- ios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["module:metro-react-native-babel-preset"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[android] | ||
target = Google Inc.:Google APIs:23 | ||
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[ignore] | ||
; We fork some components by platform | ||
.*/*[.]android.js | ||
|
||
; Ignore "BUCK" generated dirs | ||
<PROJECT_ROOT>/\.buckd/ | ||
|
||
; Ignore unexpected extra "@providesModule" | ||
.*/node_modules/.*/node_modules/fbjs/.* | ||
|
||
; Ignore duplicate module providers | ||
; For RN Apps installed via npm, "Libraries" folder is inside | ||
; "node_modules/react-native" but in the source repo it is in the root | ||
.*/Libraries/react-native/React.js | ||
|
||
; Ignore polyfills | ||
.*/Libraries/polyfills/.* | ||
|
||
; Ignore metro | ||
.*/node_modules/metro/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow/ | ||
node_modules/react-native/flow-github/ | ||
|
||
[options] | ||
emoji=true | ||
|
||
esproposal.optional_chaining=enable | ||
esproposal.nullish_coalescing=enable | ||
|
||
module.system=haste | ||
module.system.haste.use_name_reducers=true | ||
# get basename | ||
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' | ||
# strip .js or .js.flow suffix | ||
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' | ||
# strip .ios suffix | ||
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' | ||
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' | ||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' | ||
module.system.haste.paths.blacklist=.*/__tests__/.* | ||
module.system.haste.paths.blacklist=.*/__mocks__/.* | ||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.* | ||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.* | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' | ||
|
||
module.file_ext=.js | ||
module.file_ext=.jsx | ||
module.file_ext=.json | ||
module.file_ext=.native.js | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FlowFixMeProps | ||
suppress_type=$FlowFixMeState | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
|
||
[version] | ||
^0.78.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pbxproj -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
*/fastlane/report.xml | ||
*/fastlane/Preview.html | ||
*/fastlane/screenshots | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
ios/Pods |
Oops, something went wrong.