gitlab在每次集成都要进行自动化的构建(包括编译,发布,自动化测试)来验证,需要在本地配置.gitlab-ci.yml,实例内容如下:
image: node:7 before_script: - yarn install cache: paths: - node_modules job_build: stage: build script: - yarn start only: - master - develop job_test: stage: test script: - yarn test only: - master - develop job_deploy: stage: deploy script: - yarn run build - yarn run deploy:dev only: - master