|
@@ -12,10 +12,6 @@ on:
|
|
|
- package.json
|
|
- package.json
|
|
|
- yarn.lock
|
|
- yarn.lock
|
|
|
|
|
|
|
|
-defaults:
|
|
|
|
|
- run:
|
|
|
|
|
- working-directory: packages/slackbot-proxy
|
|
|
|
|
-
|
|
|
|
|
jobs:
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
test:
|
|
@@ -36,7 +32,7 @@ jobs:
|
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
|
with:
|
|
with:
|
|
|
path: node_modules
|
|
path: node_modules
|
|
|
- key: ${{ runner.OS }}-node_modules-${{ matrix.node-version }}-${{ hashFiles('./yarn.lock') }}
|
|
|
|
|
|
|
+ key: ${{ runner.OS }}-node_modules-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- name: Get yarn cache dir
|
|
- name: Get yarn cache dir
|
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
|
id: cache-yarn
|
|
id: cache-yarn
|
|
@@ -46,21 +42,21 @@ jobs:
|
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
|
with:
|
|
with:
|
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
|
- key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('./yarn.lock') }}
|
|
|
|
|
|
|
+ key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
restore-keys: |
|
|
restore-keys: |
|
|
|
${{ runner.os }}-yarn-${{ matrix.node-version }}-
|
|
${{ runner.os }}-yarn-${{ matrix.node-version }}-
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
|
run: |
|
|
run: |
|
|
|
- yarn --frozen-lockfile
|
|
|
|
|
|
|
+ yarn lerna bootstrap
|
|
|
- name: Print dependencies
|
|
- name: Print dependencies
|
|
|
run: |
|
|
run: |
|
|
|
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: yarn lint
|
|
|
|
|
|
|
+ - name: yarn test
|
|
|
run: |
|
|
run: |
|
|
|
- yarn test
|
|
|
|
|
|
|
+ yarn lerna run test
|
|
|
|
|
|
|
|
- name: Slack Notification
|
|
- name: Slack Notification
|
|
|
uses: weseek/ghaction-slack-notification@master
|
|
uses: weseek/ghaction-slack-notification@master
|
|
@@ -101,7 +97,7 @@ jobs:
|
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
|
with:
|
|
with:
|
|
|
path: node_modules
|
|
path: node_modules
|
|
|
- key: ${{ runner.OS }}-node_modules_dev-${{ matrix.node-version }}-${{ hashFiles('./yarn.lock') }}
|
|
|
|
|
|
|
+ key: ${{ runner.OS }}-node_modules_dev-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
- name: Get yarn cache dir
|
|
- name: Get yarn cache dir
|
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
|
id: cache-yarn
|
|
id: cache-yarn
|
|
@@ -111,13 +107,13 @@ jobs:
|
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
|
with:
|
|
with:
|
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
|
- key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
|
|
|
|
|
|
|
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
restore-keys: |
|
|
restore-keys: |
|
|
|
${{ runner.os }}-yarn-
|
|
${{ runner.os }}-yarn-
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
|
run: |
|
|
run: |
|
|
|
- yarn --frozen-lockfile
|
|
|
|
|
|
|
+ yarn lerna bootstrap
|
|
|
- name: Print dependencies
|
|
- name: Print dependencies
|
|
|
run: |
|
|
run: |
|
|
|
echo -n "node " && node -v
|
|
echo -n "node " && node -v
|
|
@@ -125,8 +121,8 @@ jobs:
|
|
|
yarn list --depth=0
|
|
yarn list --depth=0
|
|
|
- name: yarn dev:ci
|
|
- name: yarn dev:ci
|
|
|
run: |
|
|
run: |
|
|
|
- cp config/ci/.env.local.for-ci .env.local
|
|
|
|
|
- yarn dev:ci
|
|
|
|
|
|
|
+ cp packages/slackbot-proxy/config/ci/.env.local.for-ci packages/slackbot-proxy/.env.local
|
|
|
|
|
+ yarn lerna run --scope slackbot-proxy dev:ci
|
|
|
env:
|
|
env:
|
|
|
TYPEORM_CONNECTION: mysql
|
|
TYPEORM_CONNECTION: mysql
|
|
|
TYPEORM_HOST: localhost
|
|
TYPEORM_HOST: localhost
|
|
@@ -191,7 +187,7 @@ jobs:
|
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
|
with:
|
|
with:
|
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
path: ${{ steps.cache-yarn.outputs.dir }}
|
|
|
- key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('./yarn.lock') }}
|
|
|
|
|
|
|
+ key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
|
|
restore-keys: |
|
|
restore-keys: |
|
|
|
${{ runner.os }}-yarn-
|
|
${{ runner.os }}-yarn-
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
@@ -204,10 +200,10 @@ jobs:
|
|
|
yarn list --depth=0
|
|
yarn list --depth=0
|
|
|
- name: yarn build
|
|
- name: yarn build
|
|
|
run: |
|
|
run: |
|
|
|
- yarn build
|
|
|
|
|
|
|
+ yarn lerna run build
|
|
|
- name: yarn install --production
|
|
- name: yarn install --production
|
|
|
run: |
|
|
run: |
|
|
|
- yarn install --production
|
|
|
|
|
|
|
+ yarn lerna exec "yarn install --production"
|
|
|
- name: Print dependencies
|
|
- name: Print dependencies
|
|
|
run: |
|
|
run: |
|
|
|
echo -n "node " && node -v
|
|
echo -n "node " && node -v
|
|
@@ -215,8 +211,8 @@ jobs:
|
|
|
yarn list --production --depth=0
|
|
yarn list --production --depth=0
|
|
|
- name: yarn start:prod:ci
|
|
- name: yarn start:prod:ci
|
|
|
run: |
|
|
run: |
|
|
|
- cp config/ci/.env.local.for-ci .env.local
|
|
|
|
|
- yarn start:prod:ci
|
|
|
|
|
|
|
+ cp packages/slackbot-proxy/config/ci/.env.local.for-ci packages/slackbot-proxy/.env.local
|
|
|
|
|
+ yarn lerna run --scope slackbot-proxy start:prod:ci
|
|
|
env:
|
|
env:
|
|
|
TYPEORM_CONNECTION: mysql
|
|
TYPEORM_CONNECTION: mysql
|
|
|
TYPEORM_HOST: localhost
|
|
TYPEORM_HOST: localhost
|