Commit 7303bdda authored by Diego Mello's avatar Diego Mello Committed by GitHub

Sync master (#721)

parent 302df46d

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

{
"presets": ["react-native"],
"plugins": ["transform-decorators-legacy"],
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]],
"env": {
"production": {
"plugins": ["transform-remove-console"]
......
File mode changed from 100644 to 100755
......@@ -14,36 +14,39 @@ jobs:
steps:
- checkout
- restore_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
- run:
name: Install NPM modules
command: |
npm install
# npm install codecov
yarn
- run:
name: Lint
command: |
npm run lint
yarn lint
- run:
name: Test
command: |
npm test
yarn test
- run:
name: Codecov
command: |
npx codecov
yarn codecov
android-build:
<<: *defaults
docker:
- image: circleci/android:api-26-alpha
- save_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
e2e-test:
macos:
xcode: "10.1.0"
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
JVM_OPTS: -Xmx4096m
TERM: dumb
BASH_ENV: "~/.nvm/nvm.sh"
steps:
......@@ -54,15 +57,58 @@ jobs:
command: |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
source ~/.nvm/nvm.sh
# https://github.com/creationix/nvm/issues/1394
set +e
nvm install 8
- run:
name: Install appleSimUtils
command: |
brew update
brew tap wix/brew
brew install wix/brew/applesimutils
- run:
name: Install NPM modules
command: |
yarn global add detox-cli
yarn
- run:
name: Build
command: |
detox build --configuration ios.sim.release
- run:
name: Test
command: |
detox test --configuration ios.sim.release --cleanup
- store_artifacts:
path: /tmp/screenshots
android-build:
<<: *defaults
docker:
- image: circleci/android:api-28-node8-alpha
environment:
# GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
GRADLE_OPTS: -Xmx2048m -Dorg.gradle.daemon=false
JVM_OPTS: -Xmx4096m
TERM: dumb
BASH_ENV: "~/.nvm/nvm.sh"
steps:
- checkout
- restore_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
- run:
name: Install NPM modules
command: |
npm install
yarn
- restore_cache:
key: android-{{ checksum ".circleci/config.yml" }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
......@@ -73,6 +119,7 @@ jobs:
cd android
echo -e "" > ./gradle.properties
echo -e "android.enableAapt2=false" >> ./gradle.properties
if [[ $KEYSTORE ]]; then
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
......@@ -84,9 +131,11 @@ jobs:
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
echo -e "" > ./app/fabric.properties
echo -e "apiKey=$FABRIC_KEY" >> ./app/fabric.properties
echo -e "apiSecret=$FABRIC_SECRET" >> ./app/fabric.properties
if [[ $FABRIC_KEY ]]; then
echo -e "" > ./app/fabric.properties
echo -e "apiKey=$FABRIC_KEY" >> ./app/fabric.properties
echo -e "apiSecret=$FABRIC_SECRET" >> ./app/fabric.properties
fi
- run:
name: Install Android Depedencies
......@@ -112,7 +161,7 @@ jobs:
path: /tmp/build/outputs
- save_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
......@@ -123,7 +172,7 @@ jobs:
ios-build:
macos:
xcode: "9.0"
xcode: "10.1.0"
environment:
BASH_ENV: "~/.nvm/nvm.sh"
......@@ -150,18 +199,15 @@ jobs:
- run:
name: Install NPM modules
command: |
rm -rf node_modules
# npm install --save react-native@0.51
npm install
# npm install react-native
yarn
- run:
name: Fix known build error
command: |
# Fix error https://github.com/facebook/react-native/issues/14382
cd node_modules/react-native/scripts/
curl https://raw.githubusercontent.com/facebook/react-native/5c53f89dd86160301feee024bce4ce0c89e8c187/scripts/ios-configure-glog.sh > ios-configure-glog.sh
chmod +x ios-configure-glog.sh
# - run:
# name: Fix known build error
# command: |
# # Fix error https://github.com/facebook/react-native/issues/14382
# cd node_modules/react-native/scripts/
# curl https://raw.githubusercontent.com/facebook/react-native/5c53f89dd86160301feee024bce4ce0c89e8c187/scripts/ios-configure-glog.sh > ios-configure-glog.sh
# chmod +x ios-configure-glog.sh
- run:
name: Fastlane Build
......@@ -170,7 +216,10 @@ jobs:
cd ios
agvtool new-version -all $CIRCLE_BUILD_NUM
/usr/libexec/PlistBuddy -c "Set Fabric:APIKey $FABRIC_KEY" ./RocketChatRN/Info.plist
echo -e "./Fabric.framework/run $FABRIC_KEY $FABRIC_SECRET" > ./RocketChatRN/Fabric.sh
if [[ $FABRIC_KEY ]]; then
echo -e > "./Fabric.framework/run $FABRIC_KEY $FABRIC_SECRET" > ./RocketChatRN/Fabric.sh
fi
if [[ $MATCH_KEYCHAIN_NAME ]]; then
fastlane ios release
......@@ -191,7 +240,7 @@ jobs:
ios-testflight:
macos:
xcode: "9.0"
xcode: "10.1.0"
steps:
- checkout
......@@ -217,21 +266,20 @@ workflows:
build-and-test:
jobs:
- lint-testunit
- e2e-test:
requires:
- lint-testunit
- ios-build:
requires:
- lint-testunit
- ios-testflight:
- ios-hold-testflight:
type: approval
requires:
- ios-build
filters:
branches:
only:
- develop
- master
# - ios-testflight:
# requires:
# - ios-hold-testflight
- ios-testflight:
requires:
- ios-hold-testflight