Skip to content

Commit

Permalink
chore: add cache actions for yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Aug 15, 2020
1 parent 3d1e4c3 commit 411800f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 411800f

Please sign in to comment.