|
|
@@ -98,69 +98,11 @@ jobs:
|
|
|
- name: yarn test
|
|
|
working-directory: ./packages/app
|
|
|
run: |
|
|
|
- yarn test
|
|
|
+ yarn test:ci --selectProjects unit server
|
|
|
+ yarn test:ci --selectProjects server-v5
|
|
|
env:
|
|
|
MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test
|
|
|
|
|
|
- test-v5:
|
|
|
- runs-on: ubuntu-latest
|
|
|
-
|
|
|
- strategy:
|
|
|
- matrix:
|
|
|
- node-version: [16.x]
|
|
|
-
|
|
|
- services:
|
|
|
- mongodb:
|
|
|
- image: mongo:4.4
|
|
|
- ports:
|
|
|
- - 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-v5
|
|
|
- env:
|
|
|
- MONGO_URI: mongodb://localhost:${{ job.services.mongodb.ports['27017'] }}/growi_test_v5
|
|
|
-
|
|
|
- - 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:
|