Skip to content

Commit

Permalink
fix watchman installation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag04 committed May 8, 2018
1 parent 370bcff commit c7d453d
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ aliases:
- &run-js-tests
name: JavaScript Test Suite
command: yarn test-ci

- &run-lint-checks
name: Lint code
command: yarn lint --format junit -o ~/react-native/reports/junit/js-lint-results.xml
Expand All @@ -174,7 +174,7 @@ aliases:
./scripts/circleci/check_license.sh
./scripts/circleci/check_cache.sh
when: always

- &build-android-app
name: Build Android App
command: |
Expand All @@ -184,7 +184,7 @@ aliases:
- &create-avd
name: Create Android Virtual Device
command: source scripts/circle-ci-android-setup.sh && createAVD

- &launch-avd
name: Launch Android Virtual Device in Background
command: source scripts/circle-ci-android-setup.sh && launchAVD
Expand All @@ -210,11 +210,11 @@ aliases:
- &run-android-instrumentation-tests
name: Run Instrumentation Tests
command: |
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify build-js-bundle step completed successfully."; exit 1;
fi
source scripts/circle-ci-android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
- &collect-android-test-results
name: Collect Test Results
command: |
Expand All @@ -225,9 +225,9 @@ aliases:

- &setup-artifacts
name: Initial Setup
command: |
command: |
mkdir -p ~/react-native/reports/junit/
- &run-objc-ios-tests
name: iOS Test Suite
command: ./scripts/objc-test-ios.sh test
Expand Down Expand Up @@ -345,6 +345,8 @@ jobs:
at: ~/react-native

- run: xcrun instruments -w "iPhone 5s (11.1)" || true
# See https://github.com/Homebrew/homebrew-core/issues/26358.
- run: brew upgrade python > /dev/null
- run: brew install watchman
- run: *run-objc-ios-tests

Expand All @@ -359,6 +361,8 @@ jobs:
at: ~/react-native

- run: xcrun instruments -w "Apple TV 1080p (11.1)" || true
# See https://github.com/Homebrew/homebrew-core/issues/26358.
- run: brew upgrade python > /dev/null
- run: brew install watchman
- run: *run-objc-tvos-tests

Expand Down Expand Up @@ -386,14 +390,14 @@ jobs:
at: ~/react-native

- run: ./scripts/process-podspecs.sh

# Publishes new version onto npm
publish_npm_package:
<<: *android_defaults
steps:
# Checkout code so that we can work with `git` in publish.js
- checkout

# Configure Android SDK and related dependencies
- run: *configure-android-path
- run: *install-android-build-dependencies
Expand Down Expand Up @@ -424,7 +428,7 @@ jobs:
- restore-cache: *restore-yarn-cache
- run: *yarn
- save-cache: *save-yarn-cache

- run:
name: Publish React Native Package
command: |
Expand All @@ -435,7 +439,7 @@ jobs:
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
node ./scripts/publish-npm.js
else
echo "Skipping deploy."
echo "Skipping deploy."
fi
# Set up an Android environment for downstream jobs
Expand All @@ -454,7 +458,7 @@ jobs:

- run: *validate-android-sdk

# Starting emulator in advance as it takes some time to boot.
# Starting emulator in advance as it takes some time to boot.
- run: *create-avd
- run: *launch-avd

Expand Down Expand Up @@ -494,7 +498,7 @@ jobs:
# Test Suite
- run: *run-android-unit-tests
- run: *run-android-instrumentation-tests

# post (always runs)
- run: *collect-android-test-results
- store_test_results:
Expand All @@ -520,7 +524,7 @@ jobs:
cd bots
yarn install --non-interactive --cache-folder ~/.cache/yarn
else
echo "Skipping dependency installation."
echo "Skipping dependency installation."
fi
- save-cache: *save-cache-analysis

Expand All @@ -531,7 +535,7 @@ jobs:
if [ -n "$CIRCLE_PR_NUMBER" ]; then
cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger
else
echo "Skipping pull request analysis."
echo "Skipping pull request analysis."
fi
when: always
- run:
Expand All @@ -541,7 +545,7 @@ jobs:
if [ -n "$CIRCLE_PR_NUMBER" ]; then
cat <(echo eslint; yarn --silent lint --format=json; echo flow; yarn --silent flow check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
else
echo "Skipping code analysis."
echo "Skipping code analysis."
fi
when: always

Expand Down Expand Up @@ -600,16 +604,16 @@ workflows:
# Checkout repo and run Yarn
- checkout_code:
filters: *filter-ignore-master-stable

# Run code checks
- analyze_pr:
- analyze_pr:
filters: *filter-ignore-master-stable
requires:
requires:
- checkout_code

# Only runs on NN-stable branches
deploy:
jobs:
jobs:
# If we are on a stable branch, wait for approval to deploy to npm
- approve_publish_npm_package:
filters: *filter-only-stable
Expand All @@ -619,17 +623,17 @@ workflows:
requires:
- approve_publish_npm_package

# These tests are flaky or are yet to be fixed. They are placed on their own
# These tests are flaky or are yet to be fixed. They are placed on their own
# workflow to avoid marking benign PRs as broken.
# To run them, uncomment the entire block and open a PR (do not merge).
# To run them, uncomment the entire block and open a PR (do not merge).
# Once a test is fixed, move the test definition to the 'tests' workflow.
# disabled_tests:
# jobs:
# # Checkout repo and run Yarn (pre-req, should succeed)
# - checkout_code:
# filters: *filter-ignore-gh-pages

# # The following were DISABLED because they have not run since
# # The following were DISABLED because they have not run since
# # the migration from Travis, and they have broken since then,
# # CocoaPods
# - test_podspec:
Expand Down

0 comments on commit c7d453d

Please sign in to comment.