Skip to content

Commit

Permalink
Merge pull request #138 from blueberryapps/circle-2
Browse files Browse the repository at this point in the history
Convert to CircleCI 2.0
  • Loading branch information
Hrachos authored Aug 16, 2018
2 parents bc31d49 + 30cff4a commit a44e3bb
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 29 deletions.
68 changes: 68 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: 2
build:
docker:
image: circleci/node:6.14.3-jessie
steps:
- checkout
- run:
command: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN;
- restore_cache:
key: base-cache-{{ checksum "package.json" }}
- restore_cache:
key: example-cache-{{ checksum "package.json" }}
- run:
command: npm install && cd example && npm install
- save_cache:
key: base-cache-{{ checksum "package.json" }}
paths:
- node_modules
- save_cache:
key: example-cache-{{ checksum "example/package.json" }}
paths:
- example/node_modules
test:
docker:
image: circleci/node:6.14.3-jessie
steps:
- restore_cache:
key: base-cache-{{ checksum "package.json" }}
- restore_cache:
key: example-cache-{{ checksum "example/package.json" }}
- run:
command: npm install -g gulp
- run:
command: gulp ava
- run:
command: gulp eslint
- run:
command: cd example && gulp
- run:
command: sleep 10 && curl --retry 10 --retry-delay 5 -v http://localhost:3000/

publish:
docker:
image: circleci/node:6.14.3-jessie
steps:
- restore_cache:
key: base-cache-{{ checksum "package.json" }}
- restore_cache:
key: example-cache-{{ checksum "example/package.json" }}
- run:
command: ./publish

workflows:
version: 2
build-and-test:
jobs:
- build:
- test:
requires:
- build
- publish:
filters:
branches:
only:
- master
requires:
- build
- test
29 changes: 0 additions & 29 deletions circle.yml

This file was deleted.

0 comments on commit a44e3bb

Please sign in to comment.