# Use the docker runner image: node:8 before_script: - pwd - which nodejs - nodejs -v - which npm - npm -v - which yarn - yarn --version - yarn config set cache-folder .yarn cache: key: "$CI_BUILD_REF_NAME" paths: - node_modules/ - .yarn/ # jobs sequense pipeline stages: - test - build # test job: test project use npm test: tags: - node-8 script: - yarn install - yarn lint stage: test # build job: Use react-starter to create the react project build: tags: - node-8 script: - yarn install - npm link - which react-starter - react-starter --version - react-starter -n test - cd test && yarn && npm run lint && npm test && npm run build stage: build # build job: Use react-starter to create the simple react project build_simple: tags: - node-8 script: - yarn install - npm link - which react-starter - react-starter --version - react-starter -n test -s - cd test && yarn && npm run lint && npm test && npm run build stage: build