|
1 | | -general: |
2 | | - branches: |
3 | | - ignore: |
4 | | - - gh-pages |
5 | | - |
6 | | -## Customize the test machine |
7 | | -machine: |
8 | | - node: |
9 | | - version: 6.10.2 |
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 | | - override: |
24 | | - - "npm install" |
25 | | - - "gulp updateFixtures:test && gulp installFixtures" |
26 | | - cache_directories: |
27 | | - - "test/fixtures/node_modules" |
28 | | -# post: |
29 | | -# - wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz |
30 | | -# - tar -xzf sc-latest-linux.tar.gz |
31 | | - |
32 | | -test: |
33 | | - pre: |
34 | | - - gulp build |
35 | | - override: |
36 | | - - gulp test |
37 | | - |
38 | | -## Custom notifications |
39 | | -#notify: |
40 | | -notify: |
41 | | - webhooks: |
42 | | - # A list of hook hashes, containing the url field |
43 | | - # gitter hook |
44 | | - - url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789 |
45 | | - |
46 | | -# deployment: |
47 | | - # docs: |
48 | | - # branch: master |
49 | | - # commands: |
50 | | - # - composer global require justinwalsh/daux.io |
51 | | - # - gulp docs |
52 | | - |
53 | | -#test: |
54 | | -# pre: |
55 | | -# - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready: |
56 | | -# background: true |
57 | | -# # Wait for tunnel to be ready |
58 | | -# - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done |
59 | | -# post: |
60 | | -# - 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 |
0 commit comments