From 7213e17214ce82a9b67f5cef0a9953ce8d106f07 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:35:12 -0400 Subject: [PATCH 01/40] test results --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68616939..8cc5bff5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,12 @@ jobs: root: ~/project paths: - node_modules + - store_test_results: - path: ~/project/junit.xml + path: ~/project + + - store_artifacts: + path: ~/project android: working_directory: ~/project/android From c6c5faa653075851b7027d8349c2d39ff556cce4 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:41:42 -0400 Subject: [PATCH 02/40] artifacts --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8cc5bff5..454594b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,8 +16,8 @@ jobs: - store_test_results: path: ~/project - - store_artifacts: - path: ~/project + # - store_artifacts: + # path: ~/project android: working_directory: ~/project/android From 56af468dc25604e671af0bd96b06b6deb5ce5272 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:47:55 -0400 Subject: [PATCH 03/40] txt --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 454594b3..a65007d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,8 +16,12 @@ jobs: - store_test_results: path: ~/project - # - store_artifacts: - # path: ~/project + - run: | + touch testfile.txt + echo 'testing' > testfile.txt + + - store_artifacts: + path: testfile.txt android: working_directory: ~/project/android From 6d8184de727525d92fc34071899fae2d91eec4cf Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:50:15 -0400 Subject: [PATCH 04/40] caching --- .circleci/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a65007d0..1d662a76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,26 @@ jobs: - image: circleci/node:8 steps: - checkout - - run: yarn + + + - restore_cache: + key: demo-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + + - restore_cache: + key: demo-node-v1-{{ checksum "package.json" }}-{{ arch }} + + - run: yarn install + + - save_cache: + key: demo-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + paths: + - ~/.cache/yarn + + - save_cache: + key: demo-node-v1-{{ checksum "package.json" }}-{{ arch }} + paths: + - node_modules + - run: yarn run test - persist_to_workspace: root: ~/project From 834451a4cdb3c059017968679adacfef169f59a1 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:53:16 -0400 Subject: [PATCH 05/40] more cache --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d662a76..ca5bb867 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,6 @@ jobs: steps: - checkout - - restore_cache: key: demo-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} @@ -49,10 +48,22 @@ jobs: steps: - checkout: path: ~/project + - attach_workspace: at: ~/project + + - restore_cache: + key: demo-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + - run: bundle install + + - save_cache: + key: demo-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + - run: bundle exec fastlane test + - store_test_results: path: ~/project/android/reports From 0e76f831b3cdadb95dae9f1de61a92ad2e626ea0 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:54:47 -0400 Subject: [PATCH 06/40] cacheeee --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca5bb867..959a350c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,20 +8,20 @@ jobs: - checkout - restore_cache: - key: demo-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: demo-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: build-node-v1-{{ checksum "package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: demo-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: demo-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: build-node-v1-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules @@ -53,12 +53,12 @@ jobs: at: ~/project - restore_cache: - key: demo-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: android-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: demo-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: android-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle @@ -82,9 +82,37 @@ jobs: command: echo "ruby-2.4" > ~/.ruby-version # Not using a workspace here as Node and Yarn versions # differ between the macOS image and the Docker containers above. - - run: yarn + + - restore_cache: + key: ios-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + + - restore_cache: + key: ios-node-v1-{{ checksum "package.json" }}-{{ arch }} + + - run: yarn install + + - save_cache: + key: ios-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + paths: + - ~/.cache/yarn + + - save_cache: + key: ios-node-v1-{{ checksum "package.json" }}-{{ arch }} + paths: + - node_modules + + - restore_cache: + key: ios-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + - run: bundle install + + - save_cache: + key: ios-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + - run: bundle exec fastlane test + - run: command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml when: always From d77e32f23d956ae1f2d7f968154ba0daeed51045 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 10:57:49 -0400 Subject: [PATCH 07/40] html --- .circleci/config.yml | 6 +----- index.html | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 index.html diff --git a/.circleci/config.yml b/.circleci/config.yml index 959a350c..79799dcf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,12 +34,8 @@ jobs: - store_test_results: path: ~/project - - run: | - touch testfile.txt - echo 'testing' > testfile.txt - - store_artifacts: - path: testfile.txt + path: index.html android: working_directory: ~/project/android diff --git a/index.html b/index.html new file mode 100644 index 00000000..0cc81a4e --- /dev/null +++ b/index.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + r0se.codes + + +
+ + + + From 37015a5146912720127e608d63be7bb18b028e61 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:00:08 -0400 Subject: [PATCH 08/40] junit --- .circleci/config.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79799dcf..e2dacd94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,14 +25,20 @@ jobs: paths: - node_modules - - run: yarn run test + - run: + name: jest tests + command: yarn run test + environment: + JEST_JUNIT_OUTPUT: junit.xml + + - persist_to_workspace: root: ~/project paths: - node_modules - store_test_results: - path: ~/project + path: junit.xml - store_artifacts: path: index.html From 4b348c54264fe60774e0a56dffb0bb3ab2a97f6c Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:05:09 -0400 Subject: [PATCH 09/40] junit --- .circleci/config.yml | 6 +++--- index.html | 36 ------------------------------------ 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 index.html diff --git a/.circleci/config.yml b/.circleci/config.yml index e2dacd94..4e4b2e03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,7 @@ jobs: name: jest tests command: yarn run test environment: - JEST_JUNIT_OUTPUT: junit.xml + JEST_JUNIT_OUTPUT: /tmp/junit.xml - persist_to_workspace: @@ -38,10 +38,10 @@ jobs: - node_modules - store_test_results: - path: junit.xml + path: /tmp - store_artifacts: - path: index.html + path: /tmp/junit.xml android: working_directory: ~/project/android diff --git a/index.html b/index.html deleted file mode 100644 index 0cc81a4e..00000000 --- a/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - r0se.codes - - -
- - - - From aa0d06e207c27dc384ee1d130db1cfbf4bce1a24 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:06:29 -0400 Subject: [PATCH 10/40] demo --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e4b2e03..72dfe741 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,6 +30,7 @@ jobs: command: yarn run test environment: JEST_JUNIT_OUTPUT: /tmp/junit.xml + JEST_JUNIT_SUITE_NAME: demo - persist_to_workspace: From ca84bb40e19f527f5d6b583e4c19f3a6b35eb80e Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:08:50 -0400 Subject: [PATCH 11/40] test paths --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72dfe741..7aca4a99 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,10 +27,11 @@ jobs: - run: name: jest tests - command: yarn run test + command: | + mkdir -p test-results + yarn run test environment: - JEST_JUNIT_OUTPUT: /tmp/junit.xml - JEST_JUNIT_SUITE_NAME: demo + JEST_JUNIT_OUTPUT: test-results/junit.xml - persist_to_workspace: @@ -39,10 +40,10 @@ jobs: - node_modules - store_test_results: - path: /tmp + path: test-results - store_artifacts: - path: /tmp/junit.xml + path: test-results android: working_directory: ~/project/android @@ -119,8 +120,10 @@ jobs: - run: command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml when: always + - store_artifacts: path: /Users/distiller/project/output + - store_test_results: path: /Users/distiller/project/output/scan From 5f862a97d8e028efb72a9f10decb64d1da2c8cce Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:10:33 -0400 Subject: [PATCH 12/40] dirs --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7aca4a99..cca8c06f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,10 +28,10 @@ jobs: - run: name: jest tests command: | - mkdir -p test-results + mkdir -p test-results/jest yarn run test environment: - JEST_JUNIT_OUTPUT: test-results/junit.xml + JEST_JUNIT_OUTPUT: test-results/jest/junit.xml - persist_to_workspace: From 103e8710ebc337fbe9dc2af8af9e883f30607c3f Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:17:30 -0400 Subject: [PATCH 13/40] ios paths --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cca8c06f..c995f03c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,20 +88,20 @@ jobs: # differ between the macOS image and the Docker containers above. - restore_cache: - key: ios-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: ios-yarn-v1-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} - restore_cache: - key: ios-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: ios-node-v1-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: ios-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: ios-yarn-v1-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: ios-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: ios-node-v1-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} paths: - node_modules From 26a01bad50195b9a59bb50c21825cee22b773506 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:28:32 -0400 Subject: [PATCH 14/40] ios test paths --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c995f03c..288e5395 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -115,14 +115,16 @@ jobs: paths: - vendor/bundle - - run: bundle exec fastlane test + - run: | + mkdir -p /Users/distiller/project/output/scan/fastlane + bundle exec fastlane test - run: command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml when: always - store_artifacts: - path: /Users/distiller/project/output + path: /Users/distiller/project/output/fastlane - store_test_results: path: /Users/distiller/project/output/scan From 61b72f14fa3e46eaab67df368b7838d66b5a64e3 Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:35:22 -0400 Subject: [PATCH 15/40] fix ios paths --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 288e5395..d0e288b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,6 +78,7 @@ jobs: environment: FL_OUTPUT_DIR: /Users/distiller/project/output shell: /bin/bash --login -o pipefail + parallelism: 2 steps: - checkout: path: /Users/distiller/project @@ -120,11 +121,11 @@ jobs: bundle exec fastlane test - run: - command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml + command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml when: always - store_artifacts: - path: /Users/distiller/project/output/fastlane + path: /Users/distiller/project/output/scan/fastlane - store_test_results: path: /Users/distiller/project/output/scan From d9d8f8fa371e84c42c5e4bb02e60275942055b50 Mon Sep 17 00:00:00 2001 From: rose Date: Tue, 27 Mar 2018 11:47:03 -0400 Subject: [PATCH 16/40] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3ff232f9..9994fa02 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # CircleCI Demo React Native App +# xxxx + [![CircleCI](https://circleci.com/gh/CircleCI-Public/circleci-demo-react-native.svg?style=svg)](https://circleci.com/gh/CircleCI-Public/circleci-demo-react-native) ## Building and running locally From 6103afdeb891b21337c25eaa4ea1d461d612492b Mon Sep 17 00:00:00 2001 From: iynere Date: Tue, 27 Mar 2018 11:48:55 -0400 Subject: [PATCH 17/40] jobs vs. workflows; --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0e288b4..ea61a8ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,6 +7,8 @@ jobs: steps: - checkout + # dfd + - restore_cache: key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} From 9dece7c484df2f32595db2de2653c38b439a5c7d Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 11:34:35 -0400 Subject: [PATCH 18/40] try this --- .circleci/config.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea61a8ee..fcdab96f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,12 @@ version: 2 jobs: build: - working_directory: ~/project + working_directory: ~/demo-react-native docker: - image: circleci/node:8 steps: - checkout - # dfd - - restore_cache: key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} @@ -35,9 +33,8 @@ jobs: environment: JEST_JUNIT_OUTPUT: test-results/jest/junit.xml - - persist_to_workspace: - root: ~/project + root: ~/demo-react-native paths: - node_modules @@ -48,15 +45,14 @@ jobs: path: test-results android: - working_directory: ~/project/android + working_directory: ~/demo-react-native docker: - image: circleci/android:api-27-node8-alpha steps: - - checkout: - path: ~/project + - checkout - attach_workspace: - at: ~/project + at: ~/demo-react-native - restore_cache: key: android-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} @@ -71,7 +67,7 @@ jobs: - run: bundle exec fastlane test - store_test_results: - path: ~/project/android/reports + path: ~/demo-react-native/android/reports ios: macos: From 0d42dbe3be2bd07a485a760f97cf92ff75b90f9f Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 11:38:11 -0400 Subject: [PATCH 19/40] android paths --- .circleci/config.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fcdab96f..eb37d42c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2 jobs: - build: + node: working_directory: ~/demo-react-native docker: - image: circleci/node:8 @@ -45,11 +45,12 @@ jobs: path: test-results android: - working_directory: ~/demo-react-native + working_directory: ~/demo-react-native/android docker: - image: circleci/android:api-27-node8-alpha steps: - - checkout + - checkout: + at: ~/demo-react-native - attach_workspace: at: ~/demo-react-native @@ -132,10 +133,10 @@ workflows: version: 2 node-android-ios: jobs: - - build + - node - android: requires: - - build + - node - ios: requires: - - build + - node From 461d6ec96c6f507863d97836e508d35a0468a76e Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 11:46:18 -0400 Subject: [PATCH 20/40] fix android checkout --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb37d42c..2daee969 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,8 +49,7 @@ jobs: docker: - image: circleci/android:api-27-node8-alpha steps: - - checkout: - at: ~/demo-react-native + - checkout - attach_workspace: at: ~/demo-react-native @@ -77,7 +76,7 @@ jobs: environment: FL_OUTPUT_DIR: /Users/distiller/project/output shell: /bin/bash --login -o pipefail - parallelism: 2 + # parallelism: 2 steps: - checkout: path: /Users/distiller/project From f87b9de17f3d53aa8bc2e3f0c58712def7b51f35 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 11:52:06 -0400 Subject: [PATCH 21/40] ugh --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2daee969..5a1ebee0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,7 @@ jobs: path: test-results android: - working_directory: ~/demo-react-native/android + working_directory: ~/demo-react-native docker: - image: circleci/android:api-27-node8-alpha steps: @@ -55,14 +55,14 @@ jobs: at: ~/demo-react-native - restore_cache: - key: android-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: android-bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: android-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: android-bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} paths: - - vendor/bundle + - android/vendor/bundle - run: bundle exec fastlane test From 18170af824e4d48b2db2607a43606f9287b94000 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 11:56:47 -0400 Subject: [PATCH 22/40] refresh cache --- .circleci/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a1ebee0..07245403 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,20 +8,20 @@ jobs: - checkout - restore_cache: - key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: build-yarn-v2-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: build-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: build-node-v2-{{ checksum "package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: build-yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} + key: build-yarn-v2-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: build-node-v1-{{ checksum "package.json" }}-{{ arch }} + key: build-node-v2-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules @@ -55,12 +55,12 @@ jobs: at: ~/demo-react-native - restore_cache: - key: android-bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: android-bundle-v1-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} paths: - android/vendor/bundle @@ -87,30 +87,30 @@ jobs: # differ between the macOS image and the Docker containers above. - restore_cache: - key: ios-yarn-v1-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + key: ios-yarn-v2-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} - restore_cache: - key: ios-node-v1-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + key: ios-node-v2-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: ios-yarn-v1-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + key: ios-yarn-v2-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: ios-node-v1-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + key: ios-node-v2-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} paths: - node_modules - restore_cache: - key: ios-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: ios-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: ios-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: ios-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle From 452896051ef2d083a0b49461d4e1938eeb914e2f Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:00:35 -0400 Subject: [PATCH 23/40] paths again lol --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07245403..f2b71575 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,14 +57,14 @@ jobs: - restore_cache: key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} - - run: bundle install + - run: cd android && bundle install - save_cache: key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} paths: - android/vendor/bundle - - run: bundle exec fastlane test + - run: cd android && bundle exec fastlane test - store_test_results: path: ~/demo-react-native/android/reports From 44e553aa0ce5ae59bbfbe7b23eb8c03b0af96d9e Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:05:10 -0400 Subject: [PATCH 24/40] paths again --- .circleci/config.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2b71575..d9c4ea42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,26 +45,27 @@ jobs: path: test-results android: - working_directory: ~/demo-react-native + working_directory: ~/demo-react-native/android docker: - image: circleci/android:api-27-node8-alpha steps: - - checkout + - checkout: + path: ~/demo-react-native - attach_workspace: at: ~/demo-react-native - restore_cache: - key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + key: android-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - - run: cd android && bundle install + - run: bundle install - save_cache: - key: android-bundle-v2-{{ checksum "android/Gemfile.lock" }}-{{ arch }} + key: android-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} paths: - - android/vendor/bundle + - vendor/bundle - - run: cd android && bundle exec fastlane test + - run: bundle exec fastlane test - store_test_results: path: ~/demo-react-native/android/reports From c32f96f7b7deb6bbf9d1e8ae62a93ee7433a9d40 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:32:37 -0400 Subject: [PATCH 25/40] add junit --- android/Gemfile | 3 +++ android/fastlane/Fastfile | 5 +++++ android/fastlane/Pluginfile | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 android/fastlane/Pluginfile diff --git a/android/Gemfile b/android/Gemfile index 7a118b49..1e4d11c0 100644 --- a/android/Gemfile +++ b/android/Gemfile @@ -1,3 +1,6 @@ source "https://rubygems.org" gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) \ No newline at end of file diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 01549da7..a30463aa 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -25,6 +25,11 @@ platform :android do gradle(task: "test") end + desc "JUnit formatter" + lane :test do + pretty_junit + end + desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do gradle(task: "assembleRelease") diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile new file mode 100644 index 00000000..b23fe1d6 --- /dev/null +++ b/android/fastlane/Pluginfile @@ -0,0 +1,2 @@ +# Fetched from GitHub +gem "pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file From eef61032aa8d2d1af7be025663eecdee86ec2a67 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:36:15 -0400 Subject: [PATCH 26/40] plugin name --- android/fastlane/Pluginfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile index b23fe1d6..b087919f 100644 --- a/android/fastlane/Pluginfile +++ b/android/fastlane/Pluginfile @@ -1,2 +1,2 @@ # Fetched from GitHub -gem "pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file +gem "fastlane-plugin-pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file From d96e539f07904bf036c3753f788cd3da95112c58 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:38:50 -0400 Subject: [PATCH 27/40] fastfile --- android/fastlane/Fastfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index a30463aa..b51b804a 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -23,10 +23,6 @@ platform :android do desc "Runs all the tests" lane :test do gradle(task: "test") - end - - desc "JUnit formatter" - lane :test do pretty_junit end From e103cddb58a5fad389ea3c9629b8c1d317184cde Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 12:47:56 -0400 Subject: [PATCH 28/40] pretty junit --- android/fastlane/Fastfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index b51b804a..3289f5e1 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -22,8 +22,10 @@ platform :android do desc "Runs all the tests" lane :test do - gradle(task: "test") - pretty_junit + output_pattern = '/**/*.xml' + + gradle(task: "test", flags: "|| true") + pretty_junit(file_pattern: output_pattern) end desc "Submit a new Beta Build to Crashlytics Beta" From 429e0af44b7fd907d2c55f5b51924018a5d4b97f Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 14:31:36 -0400 Subject: [PATCH 29/40] try old version again --- .circleci/config.yml | 251 +++++++++++++++++++++++++++---------------- 1 file changed, 160 insertions(+), 91 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9c4ea42..c37240ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,74 +1,33 @@ version: 2 jobs: - node: - working_directory: ~/demo-react-native + build: + working_directory: ~/project docker: - image: circleci/node:8 steps: - checkout - - - restore_cache: - key: build-yarn-v2-{{ checksum "yarn.lock" }}-{{ arch }} - - - restore_cache: - key: build-node-v2-{{ checksum "package.json" }}-{{ arch }} - - - run: yarn install - - - save_cache: - key: build-yarn-v2-{{ checksum "yarn.lock" }}-{{ arch }} - paths: - - ~/.cache/yarn - - - save_cache: - key: build-node-v2-{{ 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 - + - run: yarn + - run: yarn run test - persist_to_workspace: - root: ~/demo-react-native + root: ~/project paths: - node_modules - - store_test_results: - path: test-results - - - store_artifacts: - path: test-results + path: ~/project/junit.xml android: - working_directory: ~/demo-react-native/android + working_directory: ~/project/android docker: - image: circleci/android:api-27-node8-alpha steps: - checkout: - path: ~/demo-react-native - + path: ~/project - attach_workspace: - at: ~/demo-react-native - - - restore_cache: - key: android-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - + at: ~/project - run: bundle install - - - save_cache: - key: android-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - paths: - - vendor/bundle - - run: bundle exec fastlane test - - store_test_results: - path: ~/demo-react-native/android/reports + path: ~/project/android/reports ios: macos: @@ -77,7 +36,6 @@ jobs: environment: FL_OUTPUT_DIR: /Users/distiller/project/output shell: /bin/bash --login -o pipefail - # parallelism: 2 steps: - checkout: path: /Users/distiller/project @@ -86,46 +44,14 @@ jobs: command: echo "ruby-2.4" > ~/.ruby-version # Not using a workspace here as Node and Yarn versions # differ between the macOS image and the Docker containers above. - - - restore_cache: - key: ios-yarn-v2-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} - - - restore_cache: - key: ios-node-v2-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} - - - run: yarn install - - - save_cache: - key: ios-yarn-v2-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} - paths: - - ~/.cache/yarn - - - save_cache: - key: ios-node-v2-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} - paths: - - node_modules - - - restore_cache: - key: ios-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - + - run: yarn - run: bundle install - - - save_cache: - key: ios-bundle-v2-{{ checksum "Gemfile.lock" }}-{{ arch }} - paths: - - vendor/bundle - - - run: | - mkdir -p /Users/distiller/project/output/scan/fastlane - bundle exec fastlane test - + - run: bundle exec fastlane test - run: - command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml + command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml when: always - - store_artifacts: - path: /Users/distiller/project/output/scan/fastlane - + path: /Users/distiller/project/output - store_test_results: path: /Users/distiller/project/output/scan @@ -133,10 +59,153 @@ workflows: version: 2 node-android-ios: jobs: - - node + - build - android: requires: - - node + - build - ios: requires: - - node + - build + +# version: 2 +# jobs: +# node: +# working_directory: ~/demo-react-native +# docker: +# - image: circleci/node:8 +# steps: +# - checkout + +# - restore_cache: +# key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + +# - restore_cache: +# key: build-node-v3-{{ checksum "package.json" }}-{{ arch }} + +# - run: yarn install + +# - save_cache: +# key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} +# paths: +# - ~/.cache/yarn + +# - save_cache: +# key: build-node-v3-{{ 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: ~/demo-react-native/android +# docker: +# - image: circleci/android:api-27-node8-alpha +# steps: +# - checkout: +# path: ~/demo-react-native + +# - attach_workspace: +# at: ~/demo-react-native + +# - restore_cache: +# key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + +# - run: bundle install + +# - save_cache: +# key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} +# paths: +# - vendor/bundle + +# - run: bundle exec fastlane test + +# - store_test_results: +# path: ~/demo-react-native/android/reports + +# ios: +# macos: +# xcode: "9.0" +# working_directory: /Users/distiller/project/ios +# environment: +# FL_OUTPUT_DIR: /Users/distiller/project/output +# shell: /bin/bash --login -o pipefail +# # parallelism: 2 +# steps: +# - checkout: +# path: /Users/distiller/project +# - run: +# name: Set Ruby Version +# command: echo "ruby-2.4" > ~/.ruby-version +# # Not using a workspace here as Node and Yarn versions +# # differ between the macOS image and the Docker containers above. + +# - restore_cache: +# key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + +# - restore_cache: +# key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + +# - run: yarn install + +# - save_cache: +# key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} +# paths: +# - ~/.cache/yarn + +# - save_cache: +# key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} +# paths: +# - node_modules + +# - restore_cache: +# key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + +# - run: bundle install + +# - save_cache: +# key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} +# paths: +# - vendor/bundle + +# - run: | +# mkdir -p /Users/distiller/project/output/scan/fastlane +# bundle exec fastlane test + +# - run: +# command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml +# when: always + +# - store_artifacts: +# path: /Users/distiller/project/output/scan/fastlane + +# - store_test_results: +# path: /Users/distiller/project/output/scan + +# workflows: +# version: 2 +# node-android-ios: +# jobs: +# - node +# - android: +# requires: +# - node +# - ios: +# requires: +# - node From c9536752c94cc46a894ba22905f699520d7a3865 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 14:57:16 -0400 Subject: [PATCH 30/40] is report auto-generated? --- .circleci/config.yml | 254 +++++++++++++----------------------- android/Gemfile.lock | 16 ++- android/fastlane/Fastfile | 6 +- android/fastlane/Pluginfile | 2 +- android/fastlane/report.xml | 23 ---- 5 files changed, 113 insertions(+), 188 deletions(-) delete mode 100644 android/fastlane/report.xml diff --git a/.circleci/config.yml b/.circleci/config.yml index c37240ed..c578f1a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,33 +1,77 @@ version: 2 jobs: - build: - working_directory: ~/project + node: + working_directory: ~/demo-react-native docker: - image: circleci/node:8 steps: - checkout - - run: yarn - - run: yarn run test + + - restore_cache: + key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + + - restore_cache: + key: build-node-v3-{{ checksum "package.json" }}-{{ arch }} + + - run: yarn install + + - save_cache: + key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + paths: + - ~/.cache/yarn + + - save_cache: + key: build-node-v3-{{ 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: ~/project + root: ~/demo-react-native paths: - node_modules + - store_test_results: - path: ~/project/junit.xml + path: test-results + + - store_artifacts: + path: test-results android: - working_directory: ~/project/android + working_directory: ~/demo-react-native/android docker: - image: circleci/android:api-27-node8-alpha steps: - checkout: - path: ~/project + path: ~/demo-react-native + - attach_workspace: - at: ~/project + at: ~/demo-react-native + + - restore_cache: + key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + - run: bundle install + + - save_cache: + key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + - run: bundle exec fastlane test + - store_test_results: - path: ~/project/android/reports + path: ~/demo-react-native/android + + - store_artifacts: + path: fastlane/report.xml ios: macos: @@ -36,6 +80,7 @@ jobs: environment: FL_OUTPUT_DIR: /Users/distiller/project/output shell: /bin/bash --login -o pipefail + # parallelism: 2 steps: - checkout: path: /Users/distiller/project @@ -44,14 +89,46 @@ jobs: command: echo "ruby-2.4" > ~/.ruby-version # Not using a workspace here as Node and Yarn versions # differ between the macOS image and the Docker containers above. - - run: yarn + + - restore_cache: + key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + + - restore_cache: + key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + + - run: yarn install + + - save_cache: + key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + paths: + - ~/.cache/yarn + + - save_cache: + key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + paths: + - node_modules + + - restore_cache: + key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + - run: bundle install - - run: bundle exec fastlane test + + - save_cache: + key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + paths: + - vendor/bundle + + - run: | + mkdir -p /Users/distiller/project/output/scan/fastlane + bundle exec fastlane test + - run: - command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/results.xml + command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml when: always + - store_artifacts: - path: /Users/distiller/project/output + path: /Users/distiller/project/output/scan/fastlane + - store_test_results: path: /Users/distiller/project/output/scan @@ -59,153 +136,10 @@ workflows: version: 2 node-android-ios: jobs: - - build + - node - android: requires: - - build + - node - ios: requires: - - build - -# version: 2 -# jobs: -# node: -# working_directory: ~/demo-react-native -# docker: -# - image: circleci/node:8 -# steps: -# - checkout - -# - restore_cache: -# key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} - -# - restore_cache: -# key: build-node-v3-{{ checksum "package.json" }}-{{ arch }} - -# - run: yarn install - -# - save_cache: -# key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} -# paths: -# - ~/.cache/yarn - -# - save_cache: -# key: build-node-v3-{{ 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: ~/demo-react-native/android -# docker: -# - image: circleci/android:api-27-node8-alpha -# steps: -# - checkout: -# path: ~/demo-react-native - -# - attach_workspace: -# at: ~/demo-react-native - -# - restore_cache: -# key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} - -# - run: bundle install - -# - save_cache: -# key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} -# paths: -# - vendor/bundle - -# - run: bundle exec fastlane test - -# - store_test_results: -# path: ~/demo-react-native/android/reports - -# ios: -# macos: -# xcode: "9.0" -# working_directory: /Users/distiller/project/ios -# environment: -# FL_OUTPUT_DIR: /Users/distiller/project/output -# shell: /bin/bash --login -o pipefail -# # parallelism: 2 -# steps: -# - checkout: -# path: /Users/distiller/project -# - run: -# name: Set Ruby Version -# command: echo "ruby-2.4" > ~/.ruby-version -# # Not using a workspace here as Node and Yarn versions -# # differ between the macOS image and the Docker containers above. - -# - restore_cache: -# key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} - -# - restore_cache: -# key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} - -# - run: yarn install - -# - save_cache: -# key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} -# paths: -# - ~/.cache/yarn - -# - save_cache: -# key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} -# paths: -# - node_modules - -# - restore_cache: -# key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} - -# - run: bundle install - -# - save_cache: -# key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} -# paths: -# - vendor/bundle - -# - run: | -# mkdir -p /Users/distiller/project/output/scan/fastlane -# bundle exec fastlane test - -# - run: -# command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml -# when: always - -# - store_artifacts: -# path: /Users/distiller/project/output/scan/fastlane - -# - store_test_results: -# path: /Users/distiller/project/output/scan - -# workflows: -# version: 2 -# node-android-ios: -# jobs: -# - node -# - android: -# requires: -# - node -# - ios: -# requires: -# - node + - node diff --git a/android/Gemfile.lock b/android/Gemfile.lock index 6f1c6b5f..ece8fc55 100644 --- a/android/Gemfile.lock +++ b/android/Gemfile.lock @@ -1,3 +1,12 @@ +GIT + remote: https://github.com/leandog/fastlane-plugin-pretty_junit + revision: cb941a239484acefe4d87ca35199868c0380cd96 + specs: + fastlane-plugin-pretty_junit (0.1.1) + colorize + nokogiri + terminal-table + GEM remote: https://rubygems.org/ specs: @@ -8,6 +17,7 @@ GEM claide (1.0.2) colored (1.2) colored2 (3.1.2) + colorize (0.8.1) commander-fastlane (4.4.5) highline (~> 1.7.2) declarative (0.0.10) @@ -88,10 +98,13 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_magick (4.5.1) + mini_portile2 (2.3.0) multi_json (1.12.2) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.3) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) os (0.9.6) plist (3.3.0) public_suffix (2.0.5) @@ -134,6 +147,7 @@ PLATFORMS DEPENDENCIES fastlane + fastlane-plugin-pretty_junit! BUNDLED WITH - 1.14.6 + 1.16.1 diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 3289f5e1..4bb9805f 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -22,10 +22,10 @@ platform :android do desc "Runs all the tests" lane :test do - output_pattern = '/**/*.xml' + # output_pattern = '/**/*.xml' - gradle(task: "test", flags: "|| true") - pretty_junit(file_pattern: output_pattern) + gradle(task: "test") # , flags: "|| true" + # pretty_junit(file_pattern: output_pattern) end desc "Submit a new Beta Build to Crashlytics Beta" diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile index b087919f..0d112176 100644 --- a/android/fastlane/Pluginfile +++ b/android/fastlane/Pluginfile @@ -1,2 +1,2 @@ # Fetched from GitHub -gem "fastlane-plugin-pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file +# gem "fastlane-plugin-pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file diff --git a/android/fastlane/report.xml b/android/fastlane/report.xml deleted file mode 100644 index 3a314e1e..00000000 --- a/android/fastlane/report.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - From d890693cbe7f73dd7f8b133c8735c40da8b1465b Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:08:36 -0400 Subject: [PATCH 31/40] ok xml shld be good now --- .circleci/config.yml | 9 ++++++--- android/Gemfile | 3 --- android/fastlane/Fastfile | 5 +---- android/fastlane/Pluginfile | 2 -- 4 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 android/fastlane/Pluginfile diff --git a/.circleci/config.yml b/.circleci/config.yml index c578f1a4..74932ad1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,13 +65,16 @@ jobs: paths: - vendor/bundle - - run: bundle exec fastlane test + - run: | + mkdir -p test-results/fastlane + bundle exec fastlane test + mv fastlane/report.xml test-results/fastlane - store_test_results: - path: ~/demo-react-native/android + path: test-results - store_artifacts: - path: fastlane/report.xml + path: test-results ios: macos: diff --git a/android/Gemfile b/android/Gemfile index 1e4d11c0..7a118b49 100644 --- a/android/Gemfile +++ b/android/Gemfile @@ -1,6 +1,3 @@ source "https://rubygems.org" gem "fastlane" - -plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) \ No newline at end of file diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 4bb9805f..01549da7 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -22,10 +22,7 @@ platform :android do desc "Runs all the tests" lane :test do - # output_pattern = '/**/*.xml' - - gradle(task: "test") # , flags: "|| true" - # pretty_junit(file_pattern: output_pattern) + gradle(task: "test") end desc "Submit a new Beta Build to Crashlytics Beta" diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile deleted file mode 100644 index 0d112176..00000000 --- a/android/fastlane/Pluginfile +++ /dev/null @@ -1,2 +0,0 @@ -# Fetched from GitHub -# gem "fastlane-plugin-pretty_junit", git: "https://github.com/leandog/fastlane-plugin-pretty_junit" \ No newline at end of file From 74ea09d8d6a5a39dd96e99d8902444d4bb56e211 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:18:44 -0400 Subject: [PATCH 32/40] ios paths --- .circleci/config.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 74932ad1..3e59c7a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,14 +79,14 @@ jobs: ios: macos: xcode: "9.0" - working_directory: /Users/distiller/project/ios + working_directory: ~/demo-react-native environment: - FL_OUTPUT_DIR: /Users/distiller/project/output + FL_OUTPUT_DIR: output shell: /bin/bash --login -o pipefail # parallelism: 2 steps: - - checkout: - path: /Users/distiller/project + - checkout + - run: name: Set Ruby Version command: echo "ruby-2.4" > ~/.ruby-version @@ -94,35 +94,35 @@ jobs: # differ between the macOS image and the Docker containers above. - restore_cache: - key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + key: ios-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + key: ios-node-v3-{{ checksum "package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: ios-yarn-v3-{{ checksum "/Users/distiller/project/yarn.lock" }}-{{ arch }} + key: ios-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: ios-node-v3-{{ checksum "/Users/distiller/project/package.json" }}-{{ arch }} + key: ios-node-v3-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules - restore_cache: - key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: ios-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle - run: | - mkdir -p /Users/distiller/project/output/scan/fastlane + mkdir -p output/scan/fastlane bundle exec fastlane test - run: @@ -130,10 +130,10 @@ jobs: when: always - store_artifacts: - path: /Users/distiller/project/output/scan/fastlane + path: output/scan - store_test_results: - path: /Users/distiller/project/output/scan + path: output/scan workflows: version: 2 From c948c4534b21a1a9a079404a457978dce110ec6d Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:21:06 -0400 Subject: [PATCH 33/40] oops; --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e59c7a9..25e1219e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,7 +114,7 @@ jobs: - restore_cache: key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} - - run: bundle install + - run: cd ios && bundle install - save_cache: key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} @@ -123,7 +123,7 @@ jobs: - run: | mkdir -p output/scan/fastlane - bundle exec fastlane test + cd ios && bundle exec fastlane test - run: command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml From cae4609bd3d0b89681c8b5e068ce669cc15cb4ea Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:25:37 -0400 Subject: [PATCH 34/40] ???? --- .circleci/config.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25e1219e..ce0a7f83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,10 +80,8 @@ jobs: macos: xcode: "9.0" working_directory: ~/demo-react-native - environment: - FL_OUTPUT_DIR: output - shell: /bin/bash --login -o pipefail - # parallelism: 2 + # environment: + # FL_OUTPUT_DIR: output steps: - checkout @@ -114,26 +112,28 @@ jobs: - restore_cache: key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} - - run: cd ios && bundle install + - run: + command: bundle install + working_directory: ios - save_cache: key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle - - run: | - mkdir -p output/scan/fastlane - cd ios && bundle exec fastlane test - - run: - command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml - when: always + command: bundle exec fastlane test + working_directory: ios - - store_artifacts: - path: output/scan + # - run: + # command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml + # when: always - - store_test_results: - path: output/scan + # - store_artifacts: + # path: output/scan + + # - store_test_results: + # path: output/scan workflows: version: 2 From 3c59d10443625e5484a542810e9393a0eda404f7 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:30:54 -0400 Subject: [PATCH 35/40] shell --- .circleci/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce0a7f83..05bc8139 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,16 +80,16 @@ jobs: macos: xcode: "9.0" working_directory: ~/demo-react-native - # environment: - # FL_OUTPUT_DIR: output + + # set 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 - # Not using a workspace here as Node and Yarn versions - # differ between the macOS image and the Docker containers above. - restore_cache: key: ios-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} @@ -97,6 +97,8 @@ jobs: - restore_cache: key: ios-node-v3-{{ checksum "package.json" }}-{{ arch }} + # Not using a workspace here as Node and Yarn versions + # differ between the macOS image and the Docker containers above. - run: yarn install - save_cache: From ce934b1998c13be8960aa47a17fdc38907f00d38 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 18:54:45 -0400 Subject: [PATCH 36/40] hows this --- .circleci/config.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05bc8139..029fa701 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -127,15 +127,20 @@ jobs: command: bundle exec fastlane test working_directory: ios - # - run: - # command: cp $FL_OUTPUT_DIR/scan/report.junit $FL_OUTPUT_DIR/scan/fastlane/results.xml - # when: always + - 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_artifacts: - # path: output/scan + - store_test_results: + path: ios/test-results - # - store_test_results: - # path: output/scan + - store_artifacts: + path: ios/test-results workflows: version: 2 From 78126efa5ca93e09249550c3f4798cc7ea5cce12 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 19:03:11 -0400 Subject: [PATCH 37/40] last run --- .circleci/config.yml | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 029fa701..53da3607 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,20 +8,20 @@ jobs: - checkout - restore_cache: - key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: build-node-v3-{{ checksum "package.json" }}-{{ arch }} + key: node-{{ checksum "package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: build-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: build-node-v3-{{ checksum "package.json" }}-{{ arch }} + key: node-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules @@ -56,19 +56,21 @@ jobs: at: ~/demo-react-native - restore_cache: - key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: android-bundle-v3-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle - - run: | - mkdir -p test-results/fastlane - bundle exec fastlane test - mv fastlane/report.xml test-results/fastlane + - 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 @@ -81,45 +83,45 @@ jobs: xcode: "9.0" working_directory: ~/demo-react-native - # set shell so our "Set Ruby Version" command gets picked up for later steps + # 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 + name: set Ruby version command: echo "ruby-2.4" > ~/.ruby-version - restore_cache: - key: ios-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: ios-node-v3-{{ checksum "package.json" }}-{{ arch }} + key: node-{{ checksum "package.json" }}-{{ arch }} - # Not using a workspace here as Node and Yarn versions - # differ between the macOS image and the Docker containers above. + # 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: ios-yarn-v3-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: ios-node-v3-{{ checksum "package.json" }}-{{ arch }} + key: node-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules - restore_cache: - key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} - run: command: bundle install working_directory: ios - save_cache: - key: ios-bundle-v3-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle @@ -128,7 +130,7 @@ jobs: working_directory: ios - run: - name: set up test-results + name: set up test results working_directory: ios when: always command: | From 9ac3e090b75141404cd2c71a6a0fcc3573d5d748 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 19:08:37 -0400 Subject: [PATCH 38/40] use cache keys --- .circleci/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53da3607..a51828a0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,20 +8,20 @@ jobs: - checkout - restore_cache: - key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: node-{{ checksum "package.json" }}-{{ arch }} + key: node-v1-{{ checksum "package.json" }}-{{ arch }} - run: yarn install - save_cache: - key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: node-{{ checksum "package.json" }}-{{ arch }} + key: node-v1-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules @@ -56,12 +56,12 @@ jobs: at: ~/demo-react-native - restore_cache: - key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} - run: bundle install - save_cache: - key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }} + key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle @@ -94,34 +94,34 @@ jobs: command: echo "ruby-2.4" > ~/.ruby-version - restore_cache: - key: yarn-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} - restore_cache: - key: node-{{ checksum "package.json" }}-{{ arch }} + 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-{{ checksum "yarn.lock" }}-{{ arch }} + key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }} paths: - ~/.cache/yarn - save_cache: - key: node-{{ checksum "package.json" }}-{{ arch }} + key: node-v1-{{ checksum "package.json" }}-{{ arch }} paths: - node_modules - restore_cache: - key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} - run: command: bundle install working_directory: ios - save_cache: - key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} + key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }} paths: - vendor/bundle From 78fd0f1f2685cea122ed8b2c473f9caed5745232 Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 19:11:49 -0400 Subject: [PATCH 39/40] undo readme, gemfile changes --- README.md | 2 -- android/Gemfile.lock | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/README.md b/README.md index 9994fa02..3ff232f9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # CircleCI Demo React Native App -# xxxx - [![CircleCI](https://circleci.com/gh/CircleCI-Public/circleci-demo-react-native.svg?style=svg)](https://circleci.com/gh/CircleCI-Public/circleci-demo-react-native) ## Building and running locally diff --git a/android/Gemfile.lock b/android/Gemfile.lock index ece8fc55..277a0f38 100644 --- a/android/Gemfile.lock +++ b/android/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: https://github.com/leandog/fastlane-plugin-pretty_junit - revision: cb941a239484acefe4d87ca35199868c0380cd96 - specs: - fastlane-plugin-pretty_junit (0.1.1) - colorize - nokogiri - terminal-table - GEM remote: https://rubygems.org/ specs: @@ -17,7 +8,6 @@ GEM claide (1.0.2) colored (1.2) colored2 (3.1.2) - colorize (0.8.1) commander-fastlane (4.4.5) highline (~> 1.7.2) declarative (0.0.10) @@ -98,13 +88,10 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_magick (4.5.1) - mini_portile2 (2.3.0) multi_json (1.12.2) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.3) - nokogiri (1.8.2) - mini_portile2 (~> 2.3.0) os (0.9.6) plist (3.3.0) public_suffix (2.0.5) @@ -147,7 +134,6 @@ PLATFORMS DEPENDENCIES fastlane - fastlane-plugin-pretty_junit! BUNDLED WITH - 1.16.1 + 1.14.6 \ No newline at end of file From 95a32dc2c498884fe2e3ddab0d4c376a2db8613d Mon Sep 17 00:00:00 2001 From: iynere Date: Thu, 29 Mar 2018 19:12:39 -0400 Subject: [PATCH 40/40] ugh newline --- android/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/Gemfile.lock b/android/Gemfile.lock index 277a0f38..6f1c6b5f 100644 --- a/android/Gemfile.lock +++ b/android/Gemfile.lock @@ -136,4 +136,4 @@ DEPENDENCIES fastlane BUNDLED WITH - 1.14.6 \ No newline at end of file + 1.14.6