From 423d1539007f2f6b3700bf81f35abb58d3810898 Mon Sep 17 00:00:00 2001 From: Hector Ramos Date: Mon, 20 Aug 2018 15:52:52 -0700 Subject: [PATCH 1/2] Re-enable Detox e2e --- .circleci/config.yml | 53 ++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26a713b185cabf..84b3c96edf1ff4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -314,29 +314,6 @@ aliases: name: End-to-End Test Suite command: node ./scripts/run-ci-e2e-tests.js --android --ios --tvos --js --retries 3; - - &install-node-8 - name: Install Node 8 - command: | - echo 'export PATH=/usr/local/opt/node@8/bin:$PATH' >> $BASH_ENV - source $BASH_ENV - brew install node@8 - brew link node@8 - node -v - - - &install-apple-simulator-utils - name: Install Apple Simulator Utilities - command: | - brew tap wix/brew - brew install applesimutils - - - &build-ios-app-e2e - name: Build iOS App for Simulator - command: yarn run build-ios-e2e - - - &run-ios-detox-tests - name: Run Detox Tests - command: yarn run test-ios-e2e - - &run-objc-ios-e2e-tests name: iOS End-to-End Test Suite command: | @@ -469,23 +446,23 @@ jobs: path: ~/react-native/reports/junit # Runs end to end tests (Detox) - # Disabled. test_detox_end_to_end: <<: *macos_defaults steps: - - attach_workspace: - at: ~/react-native - - - run: *boot-simulator-iphone - - - run: *install-node-8 - - run: *install-apple-simulator-utils - - run: *build-ios-app-e2e + - checkout - - run: *run-ios-detox-tests + - run: echo 'export PATH=/usr/local/opt/node@8/bin:$PATH' >> $BASH_ENV + - run: source $BASH_ENV + - run: brew install node@8 + - run: brew link node@8 + - run: node -v - - store_test_results: - path: ~/react-native/reports/junit + - run: brew tap wix/brew + - run: brew install applesimutils + - run: yarn cache clean + - run: yarn + - run: yarn run build-ios-e2e + - run: yarn run test-ios-e2e # Set up an Android environment for downstream jobs test_android: @@ -685,10 +662,8 @@ workflows: # requires: # - checkout_code - # - test_detox_end_to_end: - # filters: *filter-ignore-gh-pages - # requires: - # - checkout_code + - test_detox_end_to_end: + filters: *filter-ignore-gh-pages # Only runs on vX.X.X tags if all tests are green From ecad62e586f98ecb6058d4f8c2f7dce4b317f0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Tue, 21 Aug 2018 14:45:01 -0700 Subject: [PATCH 2/2] Update config.yml --- .circleci/config.yml | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 84b3c96edf1ff4..29b607de9e5fec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -449,20 +449,31 @@ jobs: test_detox_end_to_end: <<: *macos_defaults steps: - - checkout - - - run: echo 'export PATH=/usr/local/opt/node@8/bin:$PATH' >> $BASH_ENV - - run: source $BASH_ENV - - run: brew install node@8 - - run: brew link node@8 - - run: node -v - - - run: brew tap wix/brew - - run: brew install applesimutils - - run: yarn cache clean - - run: yarn - - run: yarn run build-ios-e2e - - run: yarn run test-ios-e2e + - attach_workspace: + at: ~/react-native + - run: xcrun simctl boot "iPhone 5s" || true + - run: + name: Configure Environment Variables + command: | + echo 'export PATH=/usr/local/opt/node@8/bin:$PATH' >> $BASH_ENV + source $BASH_ENV + - run: + name: Install Node 8 + command: | + brew install node@8 + brew link node@8 + brew tap wix/brew + brew install applesimutils + node -v + - run: *yarn + - run: + name: Build iOS app for simulator + command: | + yarn run build-ios-e2e + - run: + name: Run Detox Tests + command: | + yarn run test-ios-e2e # Set up an Android environment for downstream jobs test_android: @@ -664,6 +675,8 @@ workflows: - test_detox_end_to_end: filters: *filter-ignore-gh-pages + requires: + - checkout_code # Only runs on vX.X.X tags if all tests are green