diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 877c5a9b0d9a..00b8dd561b6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,15 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js latest uses: actions/setup-node@v2-beta + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Generate coverage report run: | make -j test-ci-coverage @@ -35,6 +44,15 @@ jobs: uses: actions/setup-node@v2-beta with: node-version: ${{ matrix.node-version }} + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Test on node.js ${{ matrix.node-version }} # Hack: --color has supports-color@5 returned true for GitHub CI # Remove once `chalk` is bumped to 4.0.