From 1f49688e23b7721db126517ac6bbf566664e3296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20G=C3=B3mez=20Acu=C3=B1a?= <4982414+rgommezz@users.noreply.github.com> Date: Mon, 4 Feb 2019 19:16:02 +0000 Subject: [PATCH] chore: migrating CircleCI to 2.0 --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++ circle.yml | 15 ------------ 2 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..84bf202a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,58 @@ +version: 2 +jobs: + build: + working_directory: ~/rgommezz/react-native-offline + parallelism: 1 + shell: /bin/bash --login + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + docker: + - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 + command: /sbin/init + steps: + - checkout + - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + - run: + working_directory: ~/rgommezz/react-native-offline + command: nvm install 9.10.0 && nvm alias default 9.10.0 + # Restore the dependency cache + - restore_cache: + keys: + # This branch if available + - v1-dep-{{ .Branch }}- + # Default branch if not + - v1-dep-master- + # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly + - v1-dep- + - run: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + - run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + - run: sudo apt-get update && sudo apt-get install yarn + - run: yarn install + # Save dependency cache + - save_cache: + key: v1-dep-{{ .Branch }}-{{ epoch }} + paths: + # This is a broad list of cache paths to include many possible development environments + # You can probably delete some of these entries + - vendor/bundle + - ~/virtualenvs + - ~/.m2 + - ~/.ivy2 + - ~/.bundle + - ~/.go_workspace + - ~/.gradle + - ~/.cache/bower + - ./node_modules + # Test + - run: yarn run lint + - run: yarn run test:coverage + # Teardown + # Save test results + - store_test_results: + path: /tmp/circleci-test-results + # Save artifacts + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: /tmp/circleci-test-results diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 175280ef..00000000 --- a/circle.yml +++ /dev/null @@ -1,15 +0,0 @@ -machine: - node: - version: 9.10.0 -dependencies: - pre: - # Installing Yarn - - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - - sudo apt-get update && sudo apt-get install yarn - override: - - yarn install -test: - override: - - yarn run lint - - yarn run test:coverage