Shun Miyazawa 3 سال پیش
والد
کامیت
c84de48ebb
4فایلهای تغییر یافته به همراه72 افزوده شده و 269 حذف شده
  1. 8 8
      .github/workflows/ci-app-prod.yml
  2. 0 196
      .github/workflows/ci-app.yml
  3. 63 63
      .github/workflows/codeql-analysis.yml
  4. 1 2
      .github/workflows/reusable-app-prod.yml

+ 8 - 8
.github/workflows/ci-app-prod.yml

@@ -44,17 +44,17 @@ on:
 
 jobs:
 
-  # test-prod-node14:
-  #   uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master
-  #   with:
-  #     node-version: 14.x
-  #     skip-cypress: true
-  #   secrets:
-  #     SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+  test-prod-node14:
+    uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master
+    with:
+      node-version: 14.x
+      skip-cypress: true
+    secrets:
+      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
 
 
   test-prod-node16:
-    uses: weseek/growi/.github/workflows/reusable-app-prod.yml@fix/20-basic-features
+    uses: weseek/growi/.github/workflows/reusable-app-prod.yml@master
     with:
       node-version: 16.x
       skip-cypress: ${{ contains( github.event.pull_request.labels.*.name, 'dependencies' ) && contains( github.event.pull_request.labels.*.name, 'github_actions' ) }}

+ 0 - 196
.github/workflows/ci-app.yml

@@ -1,199 +1,3 @@
-# name: Node CI for app development
-
-# on:
-#   push:
-#     branches-ignore:
-#       - release/**
-#       - rc/**
-#       - chore/**
-#       - support/prepare-v**
-#     paths:
-#       - .github/workflows/ci-app.yml
-#       - .eslint*
-#       - tsconfig.base.json
-#       - yarn.lock
-#       - packages/app/**
-#       - '!packages/app/docker/**'
-#       - packages/codemirror-textlint/**
-#       - packages/core/**
-#       - packages/remark-*/**
-#       - packages/slack/**
-#       - packages/ui/**
-
-# jobs:
-#   lint:
-#     runs-on: ubuntu-latest
-
-#     strategy:
-#       matrix:
-#         node-version: [16.x]
-
-#     steps:
-#       - uses: actions/checkout@v3
-
-#       - uses: actions/setup-node@v3
-#         with:
-#           node-version: ${{ matrix.node-version }}
-#           cache: 'yarn'
-#           cache-dependency-path: '**/yarn.lock'
-
-#       - name: Cache/Restore node_modules
-#         id: cache-dependencies
-#         uses: actions/cache@v3
-#         with:
-#           path: |
-#             **/node_modules
-#           key: node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/app/package.json') }}
-#           restore-keys: |
-#             node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-
-#             node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
-
-#       - name: lerna bootstrap
-#         run: |
-#           npx lerna bootstrap -- --frozen-lockfile
-
-# - name: lerna run lint for dependent packages
-#   run: |
-#     yarn lerna run lint --scope @growi/codemirror-textlint --scope @growi/core --scope @growi/hackmd --scope @growi/preset-themes --scope @growi/remark-* --scope @growi/slack --scope @growi/ui
-# - name: build dependent packages
-#   run: |
-#     yarn lerna run build --scope @growi/preset-themes
-# - name: lerna run lint for app
-#   run: |
-#     yarn lerna run lint --scope @growi/app
-
-#       - name: Slack Notification
-#         uses: weseek/ghaction-slack-notification@master
-#         if: failure()
-#         with:
-#           type: ${{ job.status }}
-#           job_name: '*Node CI for growi - lint (${{ matrix.node-version }})*'
-#           channel: '#ci'
-#           isCompactMode: true
-#           url: ${{ secrets.SLACK_WEBHOOK_URL }}
-
-#   test:
-#     runs-on: ubuntu-latest
-
-#     strategy:
-#       matrix:
-#         node-version: [16.x]
-
-#     services:
-#       mongodb:
-#         image: mongo:4.4
-#         ports:
-#           - 27017/tcp
-
-#     steps:
-#       - uses: actions/checkout@v3
-
-#       - uses: actions/setup-node@v3
-#         with:
-#           node-version: ${{ matrix.node-version }}
-#           cache: 'yarn'
-#           cache-dependency-path: '**/yarn.lock'
-
-#       - name: Cache/Restore node_modules
-#         id: cache-dependencies
-#         uses: actions/cache@v3
-#         with:
-#           path: |
-#             **/node_modules
-#           key: node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/app/package.json') }}
-#           restore-keys: |
-#             node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-
-#             node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
-
-#       - name: lerna bootstrap
-#         run: |
-#           npx lerna bootstrap -- --frozen-lockfile
-
-#       - name: lerna run test for plugins
-#         run: |
-#           yarn lerna run test --scope @growi/remark-*
-
-#       - name: Test app
-#         working-directory: ./packages/app
-#         run: |
-#           yarn test:ci --selectProjects unit server ; yarn test:ci --selectProjects server-v5
-#         env:
-#           MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
-
-#       - name: Upload coverage report as artifact
-#         uses: actions/upload-artifact@v3
-#         with:
-#           name: Coverage Report
-#           path: |
-#             packages/app/coverage
-#             packages/remark-growi-plugin/coverage
-
-#       - name: Slack Notification
-#         uses: weseek/ghaction-slack-notification@master
-#         if: failure()
-#         with:
-#           type: ${{ job.status }}
-#           job_name: '*Node CI for growi - test (${{ matrix.node-version }})*'
-#           channel: '#ci'
-#           isCompactMode: true
-#           url: ${{ secrets.SLACK_WEBHOOK_URL }}
-
-#   launch-dev:
-#     runs-on: ubuntu-latest
-
-#     strategy:
-#       matrix:
-#         node-version: [16.x]
-
-#     services:
-#       mongodb:
-#         image: mongo:4.4
-#         ports:
-#           - 27017/tcp
-
-#     steps:
-#       - uses: actions/checkout@v3
-
-#       - uses: actions/setup-node@v3
-#         with:
-#           node-version: ${{ matrix.node-version }}
-#           cache: 'yarn'
-#           cache-dependency-path: '**/yarn.lock'
-
-#       - name: Cache/Restore node_modules and next cache files
-#         id: cache-dependencies
-#         uses: actions/cache@v3
-#         with:
-#           path: |
-#             **/node_modules
-#             ${{ github.workspace }}/packages/app/.next/cache
-#           key: dev-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/app/package.json') }}
-#           restore-keys: |
-#             dev-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-
-#             dev-${{ runner.OS }}-node${{ matrix.node-version }}-
-
-#       - name: lerna bootstrap
-#         run: |
-#           npx lerna bootstrap -- --frozen-lockfile
-
-#       - name: yarn dev:ci
-#         working-directory: ./packages/app
-#         run: |
-#           cp config/ci/.env.local.for-ci .env.development.local
-#           yarn dev:ci
-#         env:
-#           MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_dev
-
-#       - name: Slack Notification
-#         uses: weseek/ghaction-slack-notification@master
-#         if: failure()
-#         with:
-#           type: ${{ job.status }}
-#           job_name: '*Node CI for growi - launch-dev (${{ matrix.node-version }})*'
-#           channel: '#ci'
-#           isCompactMode: true
-#           url: ${{ secrets.SLACK_WEBHOOK_URL }}
-=======
 name: Node CI for app development
 
 on:

+ 63 - 63
.github/workflows/codeql-analysis.yml

@@ -1,73 +1,73 @@
-# # For most projects, this workflow file will not need changing; you simply need
-# # to commit it to your repository.
-# #
-# # You may wish to alter this file to override the set of languages analyzed,
-# # or to provide custom queries or build logic.
-# #
-# # ******** NOTE ********
-# # We have attempted to detect the languages in your repository. Please check
-# # the `language` matrix defined below to confirm you have the correct set of
-# # supported CodeQL languages.
-# #
-# name: "CodeQL"
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
 
-# on:
-#   push:
-#     branches: [ master, dev/*, release/current ]
-#     paths:
-#       - .github/workflows/codeql-analysis.yml
-#       - packages/**
-#   pull_request:
-#     # The branches below must be a subset of the branches above
-#     branches: [ master ]
-#     paths:
-#       - .github/workflows/codeql-analysis.yml
-#       - packages/**
-#   schedule:
-#     - cron: '28 20 * * 6'
+on:
+  push:
+    branches: [ master, dev/*, release/current ]
+    paths:
+      - .github/workflows/codeql-analysis.yml
+      - packages/**
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ master ]
+    paths:
+      - .github/workflows/codeql-analysis.yml
+      - packages/**
+  schedule:
+    - cron: '28 20 * * 6'
 
-# jobs:
-#   analyze:
-#     name: Analyze
-#     runs-on: ubuntu-latest
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
 
-#     strategy:
-#       fail-fast: false
-#       matrix:
-#         language: [ 'javascript' ]
-#         # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
-#         # Learn more:
-#         # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'javascript' ]
+        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+        # Learn more:
+        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
 
-#     steps:
-#     - name: Checkout repository
-#       uses: actions/checkout@v3
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v3
 
-#     # Initializes the CodeQL tools for scanning.
-#     - name: Initialize CodeQL
-#       uses: github/codeql-action/init@v1
-#       with:
-#         languages: ${{ matrix.language }}
-#         # If you wish to specify custom queries, you can do so here or in a config file.
-#         # By default, queries listed here will override any specified in a config file.
-#         # Prefix the list here with "+" to use these queries and those in the config file.
-#         # queries: ./path/to/local/query, your-org/your-repo/queries@main
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+        # If you wish to specify custom queries, you can do so here or in a config file.
+        # By default, queries listed here will override any specified in a config file.
+        # Prefix the list here with "+" to use these queries and those in the config file.
+        # queries: ./path/to/local/query, your-org/your-repo/queries@main
 
-#     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
-#     # If this step fails, then you should remove it and run the build manually (see below)
-#     - name: Autobuild
-#       uses: github/codeql-action/autobuild@v1
+    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
+    # If this step fails, then you should remove it and run the build manually (see below)
+    - name: Autobuild
+      uses: github/codeql-action/autobuild@v1
 
-#     # ℹ️ Command-line programs to run using the OS shell.
-#     # 📚 https://git.io/JvXDl
+    # ℹ️ Command-line programs to run using the OS shell.
+    # 📚 https://git.io/JvXDl
 
-#     # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
-#     #    and modify them (or add more) to build your code if your project
-#     #    uses a compiled language
+    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+    #    and modify them (or add more) to build your code if your project
+    #    uses a compiled language
 
-#     #- run: |
-#     #   make bootstrap
-#     #   make release
+    #- run: |
+    #   make bootstrap
+    #   make release
 
-#     - name: Perform CodeQL Analysis
-#       uses: github/codeql-action/analyze@v1
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1

+ 1 - 2
.github/workflows/reusable-app-prod.yml

@@ -196,8 +196,7 @@ jobs:
       fail-fast: false
       matrix:
         # List string expressions that is comma separated ids of tests in "test/cypress/integration"
-        # spec-group: ['10', '20', '21', '30', '40', '50', '60']
-        spec-group: ['20']
+        spec-group: ['10', '20', '21', '30', '40', '50', '60']
 
     services:
       mongodb: