message: do not upload all of node_modules
diff: @@ -14,27 +14,26 @@ jobs:
  uses: actions/setup-node@v1
  with:
  node-version: ${{ matrix.node-version }}
  - - name: Cache node modules
  + - id: cache-node-modules
  uses: actions/cache@v2
  with:
  path: ./node_modules
  key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
  restore-keys: cached_node_modules_
  - - run: yarn --prefer-offline --frozen-lockfile --ignore-engines
  - - uses: actions/upload-artifact@v2
  - with:
  - name: node_modules
  - path: ./node_modules
  + - if: steps.cache-node-modules.outputs.cache-hit != 'true'
  + run: yarn --prefer-offline --frozen-lockfile --ignore-engines
  build:
  runs-on: ubuntu-latest
  needs: fetch-dependencies
  steps:
  - uses: actions/checkout@v2
  - - uses: actions/download-artifact@v2
  + - id: cache-node-modules
  + uses: actions/cache@v2
  with:
  - name: node_modules
  path: ./node_modules
  + key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
  + restore-keys: cached_node_modules_
  - run: yarn build:test
  - uses: actions/upload-artifact@v2
  with:
  @@ -46,10 +45,12 @@ jobs:
  needs: fetch-dependencies
  steps:
  - uses: actions/checkout@v2
  - - uses: actions/download-artifact@v2
  + - id: cache-node-modules
  + uses: actions/cache@v2
  with:
  - name: node_modules
  path: ./node_modules
  + key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
  + restore-keys: cached_node_modules_
  - run: yarn lint:es
  - run: yarn lint:ts
  - run: yarn lint:style
  @@ -64,9 +65,11 @@ jobs:
  with:
  name: dist
  path: ./dist
  - - uses: actions/download-artifact@v2
  + - id: cache-node-modules
  + uses: actions/cache@v2
  with:
  - name: node_modules
  path: ./node_modules
  + key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
  + restore-keys: cached_node_modules_
  - run: yarn test:cover --path ./dist
  - run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
  