Просмотр исходного кода

Merge pull request #4941 from weseek/support/node-16

support: Upgrade node to 16.x
Yuki Takei 4 лет назад
Родитель
Сommit
b83e44e8e0

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

@@ -15,7 +15,7 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
@@ -58,7 +58,7 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     services:
     services:
       mysql:
       mysql:
@@ -118,7 +118,7 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     services:
     services:
       mysql:
       mysql:

+ 5 - 26
.github/workflows/ci.yml

@@ -15,7 +15,7 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
@@ -58,17 +58,13 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     services:
     services:
       mongodb:
       mongodb:
         image: mongo:4.4
         image: mongo:4.4
         ports:
         ports:
         - 27017/tcp
         - 27017/tcp
-      mongodb36:
-        image: mongo:3.6
-        ports:
-        - 27017/tcp
 
 
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
@@ -94,12 +90,6 @@ jobs:
         yarn test
         yarn test
       env:
       env:
         MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
         MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
-    - name: yarn test with MongoDB 3.6
-      working-directory: ./packages/app
-      run: |
-        yarn test
-      env:
-        MONGO_URI: mongodb://localhost:${{ job.services.mongodb36.ports['27017'] }}/growi_test
 
 
     - name: Upload coverage report as artifact
     - name: Upload coverage report as artifact
       uses: actions/upload-artifact@v2
       uses: actions/upload-artifact@v2
@@ -123,7 +113,7 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [14.x]
+        node-version: [16.x]
 
 
     services:
     services:
       mongodb:
       mongodb:
@@ -173,17 +163,13 @@ jobs:
 
 
     strategy:
     strategy:
       matrix:
       matrix:
-        node-version: [12.x, 14.x]
+        node-version: [14.x, 16.x]
 
 
     services:
     services:
       mongodb:
       mongodb:
         image: mongo:4.4
         image: mongo:4.4
         ports:
         ports:
         - 27017/tcp
         - 27017/tcp
-      mongodb36:
-        image: mongo:3.6
-        ports:
-        - 27017/tcp
 
 
     steps:
     steps:
     - uses: actions/checkout@v2
     - uses: actions/checkout@v2
@@ -209,7 +195,7 @@ jobs:
       run: |
       run: |
         yarn lerna run build
         yarn lerna run build
       env:
       env:
-        ANALYZE_BUNDLE_SIZE: ${{ matrix.node-version == '14.x' }}
+        ANALYZE_BUNDLE_SIZE: ${{ matrix.node-version == '16.x' }}
     - name: lerna bootstrap --production
     - name: lerna bootstrap --production
       run: |
       run: |
         npx lerna bootstrap -- --production
         npx lerna bootstrap -- --production
@@ -229,13 +215,6 @@ jobs:
         yarn server:ci
         yarn server:ci
       env:
       env:
         MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi-${{ steps.getdbname.outputs.suffix }}
         MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi-${{ steps.getdbname.outputs.suffix }}
-    - name: yarn server:ci with MongoDB 3.6
-      working-directory: ./packages/app
-      run: |
-        cp config/ci/.env.local.for-ci .env.production.local
-        yarn server:ci
-      env:
-        MONGO_URI: mongodb://localhost:${{ job.services.mongodb36.ports['27017'] }}/growi-${{ steps.getdbname.outputs.suffix }}
 
 
     - name: Upload report as artifact
     - name: Upload report as artifact
       uses: actions/upload-artifact@v2
       uses: actions/upload-artifact@v2

+ 2 - 2
.github/workflows/list-unhealthy-branches.yml

@@ -14,9 +14,9 @@ jobs:
       with:
       with:
         fetch-depth: 0
         fetch-depth: 0
 
 
-    - uses: actions/setup-node@v2-beta
+    - uses: actions/setup-node@v2
       with:
       with:
-        node-version: '14'
+        node-version: '16'
 
 
     - name: List branches
     - name: List branches
       id: list-branches
       id: list-branches

+ 1 - 1
.github/workflows/release-slackbot-proxy.yml

@@ -108,7 +108,7 @@ jobs:
 
 
     - uses: actions/setup-node@v2
     - uses: actions/setup-node@v2
       with:
       with:
-        node-version: '14'
+        node-version: '16'
         cache: 'yarn'
         cache: 'yarn'
         cache-dependency-path: '**/yarn.lock'
         cache-dependency-path: '**/yarn.lock'
 
 

+ 2 - 2
.github/workflows/release.yml

@@ -24,7 +24,7 @@ jobs:
 
 
     - uses: actions/setup-node@v2
     - uses: actions/setup-node@v2
       with:
       with:
-        node-version: '14'
+        node-version: '16'
         cache: 'yarn'
         cache: 'yarn'
         cache-dependency-path: '**/yarn.lock'
         cache-dependency-path: '**/yarn.lock'
 
 
@@ -85,7 +85,7 @@ jobs:
 
 
     - uses: actions/setup-node@v2
     - uses: actions/setup-node@v2
       with:
       with:
-        node-version: '14'
+        node-version: '16'
         cache: 'yarn'
         cache: 'yarn'
         cache-dependency-path: '**/yarn.lock'
         cache-dependency-path: '**/yarn.lock'
 
 

+ 3 - 3
package.json

@@ -75,8 +75,8 @@
     "typescript": "^4.2.3"
     "typescript": "^4.2.3"
   },
   },
   "engines": {
   "engines": {
-    "node": "^12 || ^14",
-    "npm": ">=6.11.3 <7",
-    "yarn": ">=1.19.1 <2"
+    "node": "^14 || ^16",
+    "npm": ">=6.14 <7 || >=8.1 < 9",
+    "yarn": ">=1.22 <2"
   }
   }
 }
 }

+ 3 - 3
packages/app/docker/Dockerfile

@@ -7,7 +7,7 @@ ARG flavor=default
 ##
 ##
 ## deps-resolver
 ## deps-resolver
 ##
 ##
-FROM node:14-slim AS deps-resolver
+FROM node:16-slim AS deps-resolver
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 
 
 ENV appDir /opt/growi
 ENV appDir /opt/growi
@@ -51,7 +51,7 @@ RUN tar cf node_modules.tar \
 ##
 ##
 ## prebuilder-default
 ## prebuilder-default
 ##
 ##
-FROM node:14-slim AS prebuilder-default
+FROM node:16-slim AS prebuilder-default
 
 
 ENV appDir /opt/growi
 ENV appDir /opt/growi
 
 
@@ -124,7 +124,7 @@ RUN tar cf packages.tar \
 ##
 ##
 ## release
 ## release
 ##
 ##
-FROM node:14-slim
+FROM node:16-slim
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 
 
 ENV NODE_ENV production
 ENV NODE_ENV production

+ 3 - 3
packages/slackbot-proxy/docker/Dockerfile

@@ -3,7 +3,7 @@
 ##
 ##
 ## deps-resolver-base
 ## deps-resolver-base
 ##
 ##
-FROM node:14-slim AS deps-resolver-base
+FROM node:16-slim AS deps-resolver-base
 
 
 ENV appDir /opt
 ENV appDir /opt
 
 
@@ -46,7 +46,7 @@ RUN tar cf dependencies.tar \
 ##
 ##
 ## builder
 ## builder
 ##
 ##
-FROM node:14-slim AS builder
+FROM node:16-slim AS builder
 
 
 ENV appDir /opt
 ENV appDir /opt
 
 
@@ -83,7 +83,7 @@ RUN tar cf packages.tar \
 ##
 ##
 ## release
 ## release
 ##
 ##
-FROM node:14-slim
+FROM node:16-slim
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 
 
 ENV NODE_ENV production
 ENV NODE_ENV production