2017-11-17 11:25:17 +00:00
|
|
|
aliases:
|
|
|
|
- &restore-cache
|
|
|
|
keys:
|
|
|
|
- dependencies-{{ .Branch }}-{{ checksum "package.json" }}
|
|
|
|
# Fallback in case checksum fails
|
|
|
|
- dependencies-{{ .Branch }}-
|
2017-06-06 11:54:30 +00:00
|
|
|
|
2017-11-17 11:25:17 +00:00
|
|
|
- &save-cache
|
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
key: dependencies-{{ .Branch }}-{{ checksum "package.json" }}
|
|
|
|
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
test-node-9:
|
|
|
|
working_directory: ~/metro-bundler/packager/metro-bundler
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:9
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore-cache: *restore-cache
|
|
|
|
- run: yarn --no-progress
|
|
|
|
- save-cache: *save-cache
|
|
|
|
- run: yarn run test-ci
|
|
|
|
|
|
|
|
test-node-8:
|
|
|
|
working_directory: ~/metro-bundler/packager/metro-bundler
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:8
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore-cache: *restore-cache
|
|
|
|
- run: yarn --no-progress
|
|
|
|
- save-cache: *save-cache
|
|
|
|
- run: yarn run test-ci
|
|
|
|
|
|
|
|
test-node-6:
|
|
|
|
working_directory: ~/metro-bundler/packager/metro-bundler
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:6
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore-cache: *restore-cache
|
|
|
|
- run: sudo npm i -g yarn@^1.2.1
|
|
|
|
- run: yarn --no-progress
|
|
|
|
- save-cache: *save-cache
|
|
|
|
- run: yarn run test-ci
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
working_directory: ~/metro-bundler/packager/metro-bundler
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:8
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore-cache: *restore-cache
|
|
|
|
- run:
|
|
|
|
working_directory: packages/metro-bundler
|
|
|
|
command: yarn --no-progress
|
|
|
|
- save-cache: *save-cache
|
2017-11-24 15:23:00 +00:00
|
|
|
- run:
|
|
|
|
working_directory: ~/metro-bundler/
|
|
|
|
run: yarn build
|
|
|
|
- run:
|
|
|
|
working_directory: packages/metro-bundler
|
|
|
|
command: |
|
|
|
|
yarn prepare-release
|
|
|
|
npm publish
|
|
|
|
yarn cleanup-release
|
2017-11-17 11:25:17 +00:00
|
|
|
|
|
|
|
# Workflows enables us to run multiple jobs in parallel
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build-and-deploy:
|
|
|
|
jobs:
|
|
|
|
- test-node-9
|
|
|
|
- test-node-8
|
|
|
|
- test-node-6
|
|
|
|
- deploy:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+(\.[0-9]+)*/
|