Skip to content

ci(circle): use CircleCI 2.0 beta #2579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 65 additions & 58 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,65 @@
general:
branches:
ignore:
- gh-pages

## Customize the test machine
machine:
node:
version: 6.9.4
post:
- npm install -g gulp-cli

## Customize checkout
checkout:
post:
- git submodule sync
- git submodule update --init # use submodules

## Customize dependencies
dependencies:
# we automatically cache and restore many dependencies between
# builds. If you need to, you can add custom paths to cache:
cache_directories:
- "test/fixtures/node_modules"
- "docs/node_modules"
override:
- npm i
# - gulp build # npm 5 won't run `prepublish` on `npm i`, we will need to re-enable this once we go to a Node version using npm 5+
- cd docs && npm i
- gulp updateFixtures:test
- cd test/fixtures && npm i && npm run-script update-webdriver

test:
override:
- gulp test

## Custom notifications
#notify:
notify:
webhooks:
# A list of hook hashes, containing the url field
# gitter hook
- url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789

deployment:
docs:
branch: master
commands:
- cd docs && npm run build && npm run deploy

#test:
# pre:
# - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
# background: true
# # Wait for tunnel to be ready
# - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
# post:
# - killall --wait sc # wait for Sauce Connect to close the tunnel
version: 2
jobs:
build:
docker:
- image: node:7
- image: mongo
command: [mongod, --smallfiles]

working_directory: ~/generator-angular-fullstack

environment:
NODE_ENV: test

branches:
ignore:
- gh-pages

steps:
- checkout
- run: git submodule sync && git submodule update --init

# Global npm dependencies
- restore_cache:
keys:
- generator-angular-fullstack-npm-global-{{ .Branch }}
- generator-angular-fullstack-npm-global-
- run: npm install --global gulp-cli
- save_cache:
key: generator-angular-fullstack-npm-global-{{ .Branch }}
paths:
- /usr/local/lib/node_modules

# Generator npm dependencies
- restore_cache:
keys:
- generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
- generator-angular-fullstack-npm-{{ .Branch }}
- generator-angular-fullstack-npm-
- run: npm install --quiet
- save_cache:
key: generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/generator-angular-fullstack/node_modules

# Test fixtures
- run: gulp updateFixtures:test
- restore_cache:
keys:
- generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
- generator-angular-fullstack-npm-fixtures-{{ .Branch }}
- generator-angular-fullstack-npm-fixtures-
- run: gulp installFixtures
- save_cache:
key: generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
paths:
- ~/generator-angular-fullstack/test/fixtures/node_modules

- run: gulp build
- run: gulp test

- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
cd docs && npm run build && npm run deploy
fi