|
|
@@ -182,56 +182,6 @@ jobs:
|
|
|
isCompactMode: true
|
|
|
url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
|
- install-prod-node14:
|
|
|
- runs-on: ubuntu-latest
|
|
|
-
|
|
|
- strategy:
|
|
|
- matrix:
|
|
|
- node-version: [14.x]
|
|
|
-
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v2
|
|
|
-
|
|
|
- - uses: actions/setup-node@v2
|
|
|
- with:
|
|
|
- node-version: ${{ matrix.node-version }}
|
|
|
- cache: 'yarn'
|
|
|
- cache-dependency-path: '**/yarn.lock'
|
|
|
-
|
|
|
- - name: Cache/Restore node_modules
|
|
|
- id: cache-dependencies
|
|
|
- uses: actions/cache@v2
|
|
|
- with:
|
|
|
- path: |
|
|
|
- **/node_modules
|
|
|
- key: node_modules-prod-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- restore-keys: |
|
|
|
- node_modules-prod-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
- node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
-
|
|
|
- - name: Remove unnecessary packages
|
|
|
- run: |
|
|
|
- rm -rf packages/slackbot-proxy
|
|
|
- - name: lerna bootstrap --production
|
|
|
- run: |
|
|
|
- npx lerna bootstrap -- --production
|
|
|
-
|
|
|
- - name: Print dependencies
|
|
|
- run: |
|
|
|
- echo -n "node " && node -v
|
|
|
- echo -n "npm " && npm -v
|
|
|
- yarn list --depth=0
|
|
|
-
|
|
|
- - name: Slack Notification
|
|
|
- uses: weseek/ghaction-slack-notification@master
|
|
|
- if: failure()
|
|
|
- with:
|
|
|
- type: ${{ job.status }}
|
|
|
- job_name: '*Node CI for growi - install-prod (${{ matrix.node-version }})*'
|
|
|
- channel: '#ci'
|
|
|
- isCompactMode: true
|
|
|
- url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
-
|
|
|
launch-prod-node14:
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
@@ -240,7 +190,7 @@ jobs:
|
|
|
node-version: [14.x]
|
|
|
|
|
|
outputs:
|
|
|
- BUILT_PACKAGES: ${{ steps.archive-built-packages.outputs.file }}
|
|
|
+ PROD_FILES: ${{ steps.archive-prod-files.outputs.file }}
|
|
|
|
|
|
services:
|
|
|
mongodb:
|
|
|
@@ -304,17 +254,17 @@ jobs:
|
|
|
env:
|
|
|
MONGO_URI: mongodb://localhost:${{ job.services.mongodb36.ports['27017'] }}/growi
|
|
|
|
|
|
- - name: Archive built package files
|
|
|
- id: archive-built-packages
|
|
|
+ - name: Archive production files
|
|
|
+ id: archive-prod-files
|
|
|
run: |
|
|
|
- tar -cf built-packages.tar packages/**/dist packages/app/public
|
|
|
- echo ::set-output name=file::built-packages.tar
|
|
|
+ tar -cf production.tar packages/**/dist packages/app/public **/node_modules
|
|
|
+ echo ::set-output name=file::production.tar
|
|
|
|
|
|
- - name: Upload built packages as artifact
|
|
|
+ - name: Upload production files as artifact
|
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|
|
|
- name: Built Packages
|
|
|
- path: ${{ steps.archive-built-packages.outputs.file }}
|
|
|
+ name: Production Files
|
|
|
+ path: ${{ steps.archive-prod-files.outputs.file }}
|
|
|
|
|
|
- name: Upload report as artifact
|
|
|
uses: actions/upload-artifact@v2
|
|
|
@@ -333,7 +283,7 @@ jobs:
|
|
|
url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
|
run-cypress-node14:
|
|
|
- needs: [install-prod-node14, launch-prod-node14]
|
|
|
+ needs: [launch-prod-node14]
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
container: cypress/base:14.18.1
|
|
|
@@ -353,28 +303,18 @@ jobs:
|
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
- - name: Cache/Restore node_modules
|
|
|
- id: cache-dependencies
|
|
|
- uses: actions/cache@v2
|
|
|
- with:
|
|
|
- path: |
|
|
|
- **/node_modules
|
|
|
- key: node_modules-prod-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- restore-keys: |
|
|
|
- node_modules-prod-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
-
|
|
|
- name: Remove unnecessary packages
|
|
|
run: |
|
|
|
rm -rf packages/slackbot-proxy
|
|
|
|
|
|
- - name: Download built artifact
|
|
|
+ - name: Download production files artifact
|
|
|
uses: actions/download-artifact@v2
|
|
|
with:
|
|
|
- name: Built Packages
|
|
|
+ name: Production Files
|
|
|
|
|
|
- - name: Extract built artifact
|
|
|
+ - name: Extract procution files artifact
|
|
|
run: |
|
|
|
- tar -xf ${{ needs.launch-prod-node14.outputs.BUILT_PACKAGES }}
|
|
|
+ tar -xf ${{ needs.launch-prod-node14.outputs.PROD_FILES }}
|
|
|
|
|
|
- name: yarn server:ci
|
|
|
working-directory: ./packages/app
|