-
Notifications
You must be signed in to change notification settings - Fork 194
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
7 changed files
with
162 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,131 @@ | ||
defaults: | ||
requiresInstall: &requiresInstall | ||
requires: | ||
- install | ||
requiresTestApp: &requiresTestApp | ||
requires: | ||
- build-test-app | ||
getDeps: &getDeps | ||
restore_cache: | ||
key: yarn-{{ checksum "yarn.lock" }} | ||
nodeJob: &nodeJob | ||
docker: | ||
- image: circleci/node:8 | ||
|
||
version: 2 | ||
jobs: | ||
install: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- run: yarn install --frozen-lockfile | ||
- save_cache: | ||
key: yarn-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
- packages/core/node_modules | ||
- packages/integrations/node_modules | ||
- packages/test-app/node_modules | ||
|
||
lint: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- run: yarn commitlint-circle | ||
|
||
test-core: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- run: yarn core test | ||
- run: yarn codecov | ||
|
||
build-core: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- run: yarn core build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- packages/core/build/**/* | ||
|
||
build-integrations: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- run: yarn integrations build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- packages/integrations/build/**/* | ||
|
||
build-test-app: | ||
<<: *nodeJob | ||
steps: | ||
- checkout | ||
- *getDeps | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: yarn test-app build:project | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- packages/test-app/project | ||
build-test-app-android: | ||
docker: | ||
- image: circleci/android:api-26-node8-alpha | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: yarn test-app build:android | ||
|
||
build-test-app-ios: | ||
macos: | ||
xcode: "9.4.0" | ||
environment: | ||
# Needed for fastlane, see https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables | ||
LC_ALL: en_US.UTF-8 | ||
LANG: en_US.UTF-8 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
|
||
- restore_cache: | ||
key: cocoapods-specs | ||
- restore_cache: | ||
key: gem-{{ checksum "packages/test-app/Gemfile.lock" }} | ||
- run: yarn test-app build:ios | ||
- save_cache: | ||
key: gem-{{ checksum "packages/test-app/Gemfile.lock" }} | ||
paths: | ||
- packages/test-app/vendor/bundle | ||
- save_cache: | ||
key: cocoapods-specs | ||
paths: | ||
- ~/.cocoapods | ||
|
||
workflows: | ||
version: 2 | ||
|
||
build_and_test: | ||
jobs: | ||
- install | ||
- lint: *requiresInstall | ||
- test-core: *requiresInstall | ||
- build-core: *requiresInstall | ||
- build-integrations: *requiresInstall | ||
- build-test-app-android: *requiresTestApp | ||
- build-test-app-ios: *requiresTestApp | ||
- build-test-app: | ||
requires: | ||
- build-core | ||
- build-integrations |
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 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,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cd project | ||
rm -rf node_modules | ||
yarn | ||
|
||
cd android | ||
|
||
# Upgrade the build tools to 3.1.4 and Gradle to 4.4 | ||
./gradlew --no-daemon --max-workers=1 -Dorg.gradle.jvmargs="-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError" wrapper --gradle-version=4.4 --distribution-type=bin | ||
sed -i.bak s/tools.build:gradle:2.3.3/tools.build:gradle:3.1.4/g build.gradle | ||
|
||
yarn react-native link | ||
./gradlew --no-daemon --max-workers=1 -Dorg.gradle.jvmargs="-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError" build |
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,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
bundle install --path vendor/bundle | ||
|
||
cd project/ios | ||
cp ../../Podfile . | ||
|
||
yarn react-native link | ||
pod install | ||
bundle exec fastlane scan --scheme project --build_for_testing |
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 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