From 0c5ff87afadf707b768c77a911eef5f7baf32697 Mon Sep 17 00:00:00 2001 From: runnan <1608272694@qq.com> Date: Mon, 13 Sep 2021 10:44:12 +0800 Subject: [PATCH] update package.json --- .github/workflows/unit-test.yml | 29 +++++++++++++---------------- package.json | 1 + 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c0568e8..7b0d4b9 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -17,25 +17,22 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14' -# - name: Cache node modules -# uses: actions/cache@v2 -# env: -# cache-name: cache-node-modules -# with: -# # npm cache files are stored in `~/.npm` on Linux/macOS -# path: ~/.npm -# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} -# restore-keys: | -# ${{ runner.os }}-build-${{ env.cache-name }}- -# ${{ runner.os }}-build- -# ${{ runner.os }}- + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install Dependencies - run: npm -v && npm install && npm run bootstrap + run: npm -v && npm install - name: Run Unit Test run: npm run test diff --git a/package.json b/package.json index 9baf0f1..058f1e5 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "packages/*" ], "scripts": { + "postinstall": "lerna bootstrap", "bootstrap": "lerna bootstrap", "clean": "lerna clean", "test": "lerna run test --stream",