|
1 |
| -general: |
2 |
| - branches: |
3 |
| - ignore: |
4 |
| - - gh-pages |
5 |
| - |
6 |
| -## Customize the test machine |
7 |
| -machine: |
8 |
| - node: |
9 |
| - version: 6.9.4 |
10 |
| - post: |
11 |
| - - npm install -g gulp-cli |
12 |
| - |
13 |
| -## Customize checkout |
14 |
| -checkout: |
15 |
| - post: |
16 |
| - - git submodule sync |
17 |
| - - git submodule update --init # use submodules |
18 |
| - |
19 |
| -## Customize dependencies |
20 |
| -dependencies: |
21 |
| - # we automatically cache and restore many dependencies between |
22 |
| - # builds. If you need to, you can add custom paths to cache: |
23 |
| - cache_directories: |
24 |
| - - "test/fixtures/node_modules" |
25 |
| - - "docs/node_modules" |
26 |
| - override: |
27 |
| - - npm i |
28 |
| -# - 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+ |
29 |
| - - cd docs && npm i |
30 |
| - - gulp updateFixtures:test |
31 |
| - - cd test/fixtures && npm i && npm run-script update-webdriver |
32 |
| - |
33 |
| -test: |
34 |
| - override: |
35 |
| - - gulp test |
36 |
| - |
37 |
| -## Custom notifications |
38 |
| -#notify: |
39 |
| -notify: |
40 |
| - webhooks: |
41 |
| - # A list of hook hashes, containing the url field |
42 |
| - # gitter hook |
43 |
| - - url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789 |
44 |
| - |
45 |
| -deployment: |
46 |
| - docs: |
47 |
| - branch: master |
48 |
| - commands: |
49 |
| - - cd docs && npm run build && npm run deploy |
50 |
| - |
51 |
| -#test: |
52 |
| -# pre: |
53 |
| -# - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready: |
54 |
| -# background: true |
55 |
| -# # Wait for tunnel to be ready |
56 |
| -# - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done |
57 |
| -# post: |
58 |
| -# - killall --wait sc # wait for Sauce Connect to close the tunnel |
| 1 | +version: 2 |
| 2 | +jobs: |
| 3 | + build: |
| 4 | + docker: |
| 5 | + - image: node:7 |
| 6 | + - image: mongo |
| 7 | + command: [mongod, --smallfiles] |
| 8 | + |
| 9 | + working_directory: ~/generator-angular-fullstack |
| 10 | + |
| 11 | + environment: |
| 12 | + NODE_ENV: test |
| 13 | + |
| 14 | + branches: |
| 15 | + ignore: |
| 16 | + - gh-pages |
| 17 | + |
| 18 | + steps: |
| 19 | + - checkout |
| 20 | + - run: git submodule sync && git submodule update --init |
| 21 | + |
| 22 | + # Global npm dependencies |
| 23 | + - restore_cache: |
| 24 | + keys: |
| 25 | + - generator-angular-fullstack-npm-global-{{ .Branch }} |
| 26 | + - generator-angular-fullstack-npm-global- |
| 27 | + - run: npm install --global gulp-cli |
| 28 | + - save_cache: |
| 29 | + key: generator-angular-fullstack-npm-global-{{ .Branch }} |
| 30 | + paths: |
| 31 | + - /usr/local/lib/node_modules |
| 32 | + |
| 33 | + # Generator npm dependencies |
| 34 | + - restore_cache: |
| 35 | + keys: |
| 36 | + - generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }} |
| 37 | + - generator-angular-fullstack-npm-{{ .Branch }} |
| 38 | + - generator-angular-fullstack-npm- |
| 39 | + - run: npm install --quiet |
| 40 | + - save_cache: |
| 41 | + key: generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }} |
| 42 | + paths: |
| 43 | + - ~/generator-angular-fullstack/node_modules |
| 44 | + |
| 45 | + # Test fixtures |
| 46 | + - run: gulp updateFixtures:test |
| 47 | + - restore_cache: |
| 48 | + keys: |
| 49 | + - generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }} |
| 50 | + - generator-angular-fullstack-npm-fixtures-{{ .Branch }} |
| 51 | + - generator-angular-fullstack-npm-fixtures- |
| 52 | + - run: gulp installFixtures |
| 53 | + - save_cache: |
| 54 | + key: generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }} |
| 55 | + paths: |
| 56 | + - ~/generator-angular-fullstack/test/fixtures/node_modules |
| 57 | + |
| 58 | + - run: gulp build |
| 59 | + - run: gulp test |
| 60 | + |
| 61 | + - deploy: |
| 62 | + command: | |
| 63 | + if [ "${CIRCLE_BRANCH}" == "master" ]; then |
| 64 | + cd docs && npm run build && npm run deploy |
| 65 | + fi |
0 commit comments