|
|
@@ -9,7 +9,6 @@ on:
|
|
|
- support/prepare-v**
|
|
|
|
|
|
jobs:
|
|
|
-
|
|
|
lint:
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
@@ -18,46 +17,44 @@ jobs:
|
|
|
node-version: [16.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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- restore-keys: |
|
|
|
- node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
-
|
|
|
- - name: lerna bootstrap
|
|
|
- run: |
|
|
|
- npx lerna bootstrap -- --frozen-lockfile
|
|
|
-
|
|
|
- - name: lerna run lint for plugins
|
|
|
- run: |
|
|
|
- yarn lerna run lint --scope @growi/plugin-*
|
|
|
- - name: lerna run lint for app
|
|
|
- run: |
|
|
|
- yarn lerna run lint --scope @growi/app --scope @growi/core --scope @growi/ui
|
|
|
-
|
|
|
- - 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 }}
|
|
|
-
|
|
|
-
|
|
|
+ - 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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
+
|
|
|
+ - name: lerna bootstrap
|
|
|
+ run: |
|
|
|
+ npx lerna bootstrap -- --frozen-lockfile
|
|
|
+
|
|
|
+ - name: lerna run lint for plugins
|
|
|
+ run: |
|
|
|
+ yarn lerna run lint --scope @growi/plugin-*
|
|
|
+ - name: lerna run lint for app
|
|
|
+ run: |
|
|
|
+ yarn lerna run lint --scope @growi/app --scope @growi/core --scope @growi/ui
|
|
|
+
|
|
|
+ - 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
|
|
|
@@ -70,56 +67,53 @@ jobs:
|
|
|
mongodb:
|
|
|
image: mongo:4.4
|
|
|
ports:
|
|
|
- - 27017/tcp
|
|
|
+ - 27017/tcp
|
|
|
|
|
|
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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- restore-keys: |
|
|
|
- node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
-
|
|
|
- - name: lerna bootstrap
|
|
|
- run: |
|
|
|
- npx lerna bootstrap -- --frozen-lockfile
|
|
|
-
|
|
|
- - name: yarn test
|
|
|
- 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@v2
|
|
|
- with:
|
|
|
- name: Coverage Report
|
|
|
- path: packages/app/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 }}
|
|
|
-
|
|
|
-
|
|
|
+ - 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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
|
|
|
+
|
|
|
+ - name: lerna bootstrap
|
|
|
+ run: |
|
|
|
+ npx lerna bootstrap -- --frozen-lockfile
|
|
|
+
|
|
|
+ - name: yarn test
|
|
|
+ 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@v2
|
|
|
+ with:
|
|
|
+ name: Coverage Report
|
|
|
+ path: packages/app/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
|
|
|
@@ -132,45 +126,45 @@ jobs:
|
|
|
mongodb:
|
|
|
image: mongo:4.4
|
|
|
ports:
|
|
|
- - 27017/tcp
|
|
|
+ - 27017/tcp
|
|
|
|
|
|
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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- restore-keys: |
|
|
|
- node_modules-${{ 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 }}
|
|
|
+ - 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-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ node_modules-${{ 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 }}
|