1 |
|
2 | image: node:8
|
3 |
|
4 | before_script:
|
5 | - pwd
|
6 | - which nodejs
|
7 | - nodejs -v
|
8 | - which npm
|
9 | - npm -v
|
10 | - which yarn
|
11 | - yarn --version
|
12 | - yarn config set cache-folder .yarn
|
13 |
|
14 | cache:
|
15 | key: "$CI_BUILD_REF_NAME"
|
16 | paths:
|
17 | - node_modules/
|
18 | - .yarn/
|
19 |
|
20 |
|
21 | stages:
|
22 | - test
|
23 | - build
|
24 |
|
25 |
|
26 | test:
|
27 | tags:
|
28 | - node-8
|
29 | script:
|
30 | - yarn install
|
31 | - yarn lint
|
32 | stage: test
|
33 |
|
34 |
|
35 |
|
36 | build:
|
37 | tags:
|
38 | - node-8
|
39 | script:
|
40 | - yarn install
|
41 | - npm link
|
42 | - which react-starter
|
43 | - react-starter --version
|
44 | - react-starter -n test
|
45 | - cd test && yarn && npm run lint && npm test && npm run build
|
46 | stage: build
|
47 |
|
48 |
|
49 | build_simple:
|
50 | tags:
|
51 | - node-8
|
52 | script:
|
53 | - yarn install
|
54 | - npm link
|
55 | - which react-starter
|
56 | - react-starter --version
|
57 | - react-starter -n test -s
|
58 | - cd test && yarn && npm run lint && npm test && npm run build
|
59 | stage: build
|