浏览代码

chore: add ci files

cuiyalong 3 年之前
父节点
当前提交
866f0dbe9b
共有 3 个文件被更改,包括 44 次插入0 次删除
  1. 17 0
      .gitlab-ci.yml
  2. 2 0
      .npmrc
  3. 25 0
      ci-lint/package.json

+ 17 - 0
.gitlab-ci.yml

@@ -0,0 +1,17 @@
+image: node:16.14.2-alpine
+
+stages:          # List of stages for jobs, and their order of execution
+  - lint
+
+install:       # This job runs in the build stage, which runs first.
+  stage: lint
+  script:
+    - cp ./ci-lint/package.json ./package.json
+    - echo "Use yarn management node_modules"
+    -
+      hash yarn 2>/dev/null || { 
+        echo >&2 "Not has yarn, wait install";
+        npm install yarn --prefer-offline --no-audit -g;
+      }
+    - yarn install --pure-lockfile --prefer-offline
+    - yarn run lint

+ 2 - 0
.npmrc

@@ -0,0 +1,2 @@
+registry=https://registry.npmmirror.com/
+@jianyu:registry=http://192.168.3.207:4873/

+ 25 - 0
ci-lint/package.json

@@ -0,0 +1,25 @@
+{
+  "name": "jy-mobile",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "lint": "vue-cli-service lint"
+  },
+  "devDependencies": {
+    "@babel/eslint-parser": "^7.12.16",
+    "@vue/cli-plugin-babel": "~5.0.4",
+    "@vue/cli-plugin-eslint": "~5.0.4",
+    "@vue/cli-plugin-router": "~5.0.4",
+    "@vue/cli-plugin-vuex": "~5.0.4",
+    "@vue/cli-service": "~5.0.4",
+    "@vue/eslint-config-standard": "^6.1.0",
+    "babel-plugin-import": "^1.13.3",
+    "eslint": "^7.32.0",
+    "eslint-plugin-import": "^2.25.3",
+    "eslint-plugin-node": "^11.1.0",
+    "eslint-plugin-promise": "^5.1.0",
+    "eslint-plugin-standard": "^4.0.0",
+    "eslint-plugin-vue": "^8.0.3",
+    "vue-template-compiler": "^2.6.11"
+  }
+}