فهرست منبع

fix(ci): refine test commands and remove coverage report uploads

Yuki Takei 5 روز پیش
والد
کامیت
18233d0ba7
4فایلهای تغییر یافته به همراه22 افزوده شده و 21 حذف شده
  1. 6 16
      .github/workflows/ci-app.yml
  2. 4 2
      apps/app/package.json
  3. 12 0
      apps/app/turbo.json
  4. 0 3
      turbo.json

+ 6 - 16
.github/workflows/ci-app.yml

@@ -130,19 +130,16 @@ jobs:
           pnpm add turbo --global
           pnpm install --frozen-lockfile
 
-      - name: Test
+      - name: Test (app - unit & component)
         run: |
-          turbo run test --filter=@growi/app --filter=./packages/* --env-mode=loose
+          turbo run test:unit test:components --filter=@growi/app --env-mode=loose
         env:
           MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
 
-      - name: Upload coverage report as artifact
-        uses: actions/upload-artifact@v7
-        with:
-          name: coverage-mongo${{ matrix.mongodb-version }}
-          path: |
-            apps/app/coverage
-            packages/remark-growi-directive/coverage
+      - name: Test (packages)
+        run: |
+          turbo run test --filter=./packages/* --env-mode=loose
+
 
       - name: Slack Notification
         uses: weseek/ghaction-slack-notification@master
@@ -213,13 +210,6 @@ jobs:
           VITE_ELASTICSEARCH_URI: http://localhost:9200/growi
           VITE_ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch-version.env }}
 
-      - name: Upload coverage report as artifact
-        uses: actions/upload-artifact@v7
-        with:
-          name: coverage-es${{ matrix.elasticsearch-version.env }}-mongo${{ matrix.mongodb-version }}
-          path: |
-            apps/app/coverage
-
       - name: Slack Notification
         uses: weseek/ghaction-slack-notification@master
         if: failure()

+ 4 - 2
apps/app/package.json

@@ -41,11 +41,13 @@
     "prelint:typecheck": "next typegen",
     "prelint:openapi:apiv3": "pnpm run openapi:generate-spec:apiv3",
     "prelint:openapi:apiv1": "pnpm run openapi:generate-spec:apiv1",
-    "test": "vitest run --project=app-unit --project=app-components",
+    "test": "vitest run",
+    "test:unit": "vitest run --project=app-unit",
+    "test:integ": "vitest run --project=app-integration",
+    "test:components": "vitest run --project=app-components",
     "test:coverage": "run-p test:coverage:* test:integ",
     "test:coverage:unit": "COLUMNS=200 vitest run --coverage --project=app-unit",
     "test:coverage:components": "COLUMNS=200 vitest run --coverage --project=app-components",
-    "test:integ": "vitest run --project=app-integration",
     "//// misc": "",
     "console": "npm run repl",
     "repl": "cross-env NODE_ENV=development npm run ts-node src/server/repl.ts",

+ 12 - 0
apps/app/turbo.json

@@ -89,6 +89,18 @@
       "dependsOn": ["^dev"],
       "outputLogs": "new-only"
     },
+    "test:unit": {
+      "dependsOn": ["^dev"],
+      "outputLogs": "new-only"
+    },
+    "test:integ": {
+      "dependsOn": ["^dev"],
+      "outputLogs": "new-only"
+    },
+    "test:components": {
+      "dependsOn": ["^dev"],
+      "outputLogs": "new-only"
+    },
 
     "version:patch": {
       "cache": false,

+ 0 - 3
turbo.json

@@ -82,9 +82,6 @@
     "test": {
       "outputLogs": "new-only"
     },
-    "test:integ": {
-      "outputLogs": "new-only"
-    },
 
     "//#version:patch": {
       "cache": false