Yuki Takei 4 лет назад
Родитель
Сommit
3f237cfb4a

+ 14 - 78
.github/workflows/ci-app-prod.yml

@@ -1,96 +1,35 @@
 name: Node CI for app production
 
 on:
-  pull_request:
-    types: [opened, reopened, synchronize]
+  push:
+    branches-ignore:
+      - release/**
+      - rc/**
+      - chore/**
+      - support/prepare-v**
 
 jobs:
 
-  retrieve-merge-base-hash:
-
-    runs-on: ubuntu-latest
-
-    outputs:
-      MERGE_BASE_SHA: ${{ steps.get-merge-base.outputs.sha }}
-
-    steps:
-
-    - uses: actions/checkout@v2
-      with:
-        fetch-depth: 0
-
-    - name: Git merge-base
-      id: get-merge-base
-      run: |
-        sha=`git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}`
-        echo "::set-output name=sha::$sha"
-
-
-  run-reg-suit-sync-expected:
-    needs: [retrieve-merge-base-hash]
-
-    uses: weseek/growi/.github/workflows/reusable-app-reg-suit.yml@support/vrt-with-cypress
-
-    with:
-      node-version: 14.x
-      checkout-ref: ${{ needs.retrieve-merge-base-hash.outputs.MERGE_BASE_SHA }}
-      run-sync-expected: true
-    secrets:
-      REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: ${{ secrets.REG_NOTIFY_GITHUB_PLUGIN_CLIENTID }}
-      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
-      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
-
-
-  test-prod-merge-base:
-    needs: [retrieve-merge-base-hash, run-reg-suit-sync-expected]
-
+  test-prod-12.x:
     uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/vrt-with-cypress
-
-    if: ${{ !needs.run-reg-suit-sync-expected.outputs.EXPECTED_IMAGES_EXIST }}
-
     with:
-      node-version: 14.x
-      checkout-ref: ${{ needs.retrieve-merge-base-hash.outputs.MERGE_BASE_SHA }}
-      skip-launching-test: true
-      cypress-report-artifact-name: Cypress report for base
+      node-version: 12.x
+      skip-cypress: true
     secrets:
       SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
 
 
-  run-reg-suit-merge-base:
-    needs: [test-prod-merge-base]
-
-    uses: weseek/growi/.github/workflows/reusable-app-reg-suit.yml@support/vrt-with-cypress
-
-    if: always()
-
-    with:
-      node-version: 14.x
-      checkout-ref: ${{ github.event.pull_request.base.ref }}
-      run-sync-expected: true
-      run-compare: true
-      run-publish: true
-      cypress-report-artifact-name: Cypress report for base
-    secrets:
-      REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: ${{ secrets.REG_NOTIFY_GITHUB_PLUGIN_CLIENTID }}
-      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
-      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
-
-
-  test-prod-head:
+  test-prod-14.x:
     uses: weseek/growi/.github/workflows/reusable-app-prod.yml@support/vrt-with-cypress
-
     with:
       node-version: 14.x
-      cypress-report-artifact-name: Cypress report for head
+      cypress-report-artifact-name: Cypress report
     secrets:
       SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
 
 
-  run-reg-suit-head:
-    needs: [run-reg-suit-merge-base, test-prod-head]
+  run-reg-suit-14.x:
+    needs: [test-prod-14.x]
 
     uses: weseek/growi/.github/workflows/reusable-app-reg-suit.yml@support/vrt-with-cypress
 
@@ -98,10 +37,7 @@ jobs:
 
     with:
       node-version: 14.x
-      run-sync-expected: true
-      run-compare: true
-      run-publish: true
-      cypress-report-artifact-name: Cypress report for head
+      cypress-report-artifact-name: Cypress report
     secrets:
       REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: ${{ secrets.REG_NOTIFY_GITHUB_PLUGIN_CLIENTID }}
       AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

+ 3 - 12
.github/workflows/reusable-app-prod.yml

@@ -6,10 +6,7 @@ on:
       node-version:
         required: true
         type: string
-      checkout-ref:
-        type: string
-        default: ${{ github.head_ref }}
-      skip-launching-test:
+      skip-cypress:
         type: boolean
       cypress-report-artifact-name:
         required: true
@@ -28,8 +25,6 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-      with:
-        ref: ${{ inputs.checkout-ref }}
 
     - uses: actions/setup-node@v2
       with:
@@ -95,8 +90,6 @@ jobs:
     needs: [build-prod]
     runs-on: ubuntu-latest
 
-    if: ${{ !inputs.skip-launching-test }}
-
     services:
       mongodb:
         image: mongo:4.4
@@ -109,8 +102,6 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-      with:
-        ref: ${{ inputs.checkout-ref }}
 
     - uses: actions/setup-node@v2
       with:
@@ -184,6 +175,8 @@ jobs:
   run-cypress:
     needs: [build-prod]
 
+    if: ${{ !inputs.skip-cypress }}
+
     runs-on: ubuntu-latest
     container: cypress/base:14.18.1
 
@@ -201,8 +194,6 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-      with:
-        ref: ${{ inputs.checkout-ref }}
 
     - uses: actions/setup-node@v2
       with:

+ 1 - 6
.github/workflows/reusable-app-reg-suit.yml

@@ -9,13 +9,8 @@ on:
       checkout-ref:
         type: string
         default: ${{ github.head_ref }}
-      run-sync-expected:
-        type: boolean
-      run-compare:
-        type: boolean
-      run-publish:
-        type: boolean
       cypress-report-artifact-name:
+        required: true
         type: string
     secrets:
       REG_NOTIFY_GITHUB_PLUGIN_CLIENTID: