|
@@ -70,6 +70,12 @@ jobs:
|
|
|
matrix:
|
|
matrix:
|
|
|
node-version: [14.x]
|
|
node-version: [14.x]
|
|
|
|
|
|
|
|
|
|
+ services:
|
|
|
|
|
+ mongodb:
|
|
|
|
|
+ image: mongo:4.4
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - 27017/tcp
|
|
|
|
|
+
|
|
|
steps:
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
@@ -103,15 +109,11 @@ jobs:
|
|
|
echo -n "node " && node -v
|
|
echo -n "node " && node -v
|
|
|
echo -n "npm " && npm -v
|
|
echo -n "npm " && npm -v
|
|
|
yarn list --depth=0
|
|
yarn list --depth=0
|
|
|
- - name: Launch MongoDB
|
|
|
|
|
- uses: wbari/start-mongoDB@v0.2
|
|
|
|
|
- with:
|
|
|
|
|
- mongoDBVersion: 3.6
|
|
|
|
|
- name: yarn test
|
|
- name: yarn test
|
|
|
run: |
|
|
run: |
|
|
|
yarn test
|
|
yarn test
|
|
|
env:
|
|
env:
|
|
|
- MONGO_URI: mongodb://localhost:27017/growi_test
|
|
|
|
|
|
|
+ MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
|
|
|
|
|
|
|
|
- name: Slack Notification
|
|
- name: Slack Notification
|
|
|
uses: weseek/ghaction-slack-notification@master
|
|
uses: weseek/ghaction-slack-notification@master
|
|
@@ -202,6 +204,12 @@ jobs:
|
|
|
matrix:
|
|
matrix:
|
|
|
node-version: [12.x, 14.x]
|
|
node-version: [12.x, 14.x]
|
|
|
|
|
|
|
|
|
|
+ services:
|
|
|
|
|
+ mongodb:
|
|
|
|
|
+ image: mongo:4.4
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - 27017/tcp
|
|
|
|
|
+
|
|
|
steps:
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
@@ -254,15 +262,11 @@ jobs:
|
|
|
echo -n "node " && node -v
|
|
echo -n "node " && node -v
|
|
|
echo -n "npm " && npm -v
|
|
echo -n "npm " && npm -v
|
|
|
yarn list --production --depth=0
|
|
yarn list --production --depth=0
|
|
|
- - name: Launch MongoDB
|
|
|
|
|
- uses: wbari/start-mongoDB@v0.2
|
|
|
|
|
- with:
|
|
|
|
|
- mongoDBVersion: 3.6
|
|
|
|
|
- name: yarn server:prod:ci
|
|
- name: yarn server:prod:ci
|
|
|
run: |
|
|
run: |
|
|
|
yarn server:prod:ci
|
|
yarn server:prod:ci
|
|
|
env:
|
|
env:
|
|
|
- MONGO_URI: mongodb://localhost:27017/growi
|
|
|
|
|
|
|
+ MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
|
|
|
|
|
|
|
|
- name: Upload report as artifact
|
|
- name: Upload report as artifact
|
|
|
uses: actions/upload-artifact@v2
|
|
uses: actions/upload-artifact@v2
|