Yuki Takei 4 лет назад
Родитель
Сommit
3576f12f95
2 измененных файлов с 9 добавлено и 5 удалено
  1. 3 3
      .github/workflows/ci.yml
  2. 6 2
      packages/app/package.json

+ 3 - 3
.github/workflows/ci.yml

@@ -49,12 +49,12 @@ jobs:
         echo -n "node " && node -v
         echo -n "npm " && npm -v
         yarn list --depth=0
-    - name: yarn test:lint for plugins
+    - name: lerna run test:lint for plugins
       run: |
         yarn lerna run test:lint --scope @growi/plugin-pukiwiki-like-linker
-    - name: yarn test:lint for app
+    - name: lerna run test:lint for app
       run: |
-        yarn lerna run test:lint --scope @growi/slack --scope @growi/app
+        yarn lerna run test:lint --scope @growi/app
 
     - name: Slack Notification
       uses: weseek/ghaction-slack-notification@master

+ 6 - 2
packages/app/package.json

@@ -14,9 +14,13 @@
     "predev:client": "yarn prebuild",
     "test:lint:js": "eslint \"**/*.{js,jsx,ts,tsx}\"",
     "test:lint:styles": "stylelint src/**/*.scss",
-    "test:lint:swagger2openapi": "node node_modules/swagger2openapi/oas-validate tmp/swagger.json",
-    "test:lint": "run-p lint:*",
+    "test:lint:swagger2openapi": "node node_modules/.bin/oas-validate tmp/swagger.json",
+    "test:lint": "run-p test:lint:*",
     "test:unit": "cross-env NODE_ENV=test jest --passWithNoTests -- ",
+    "pretest:lint:swagger2openapi": "yarn openapi:v3",
+    "swagger-jsdoc": "swagger-jsdoc -o tmp/swagger.json -d config/swagger-definition.js",
+    "openapi:v3": "cross-env API_VERSION=3 yarn swagger-jsdoc -- \"src/server/routes/apiv3/**/*.js\" \"src/server/models/**/*.js\"",
+    "openapi:v1": "cross-env API_VERSION=1 yarn swagger-jsdoc -- \"src/server/*/*.js\" \"src/server/models/**/*.js\"",
     "migrate": "yarn migrate:up",
     "migrate:create": "yarn ts-node node_modules/.bin/migrate-mongo create -f config/migrate.js -- ",
     "migrate:status": "yarn ts-node node_modules/.bin/migrate-mongo status -f config/migrate.js",