Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
CI improvements (#1984)
Browse files Browse the repository at this point in the history
- Use setup-node's built-in yarn caching
- Add .tsbuildinfo and ts folders to CI caching for faster builds
  • Loading branch information
BPScott authored Aug 4, 2021
1 parent d6a1beb commit 57c3b3b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,20 @@ jobs:
- uses: actions/checkout@v2
name: Checkout

- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory
id: yarn-cache-get-dir
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Restore yarn cache
with:
path: ${{ steps.yarn-cache-get-dir.outputs.dir }}
key: ${{ runner.os }}-node${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node${{ matrix.node-version }}-yarn-
cache: 'yarn'

- uses: actions/cache@v2
id: sewing-kit-cache
name: Restore sewing-kit cache
with:
path: |
.sewing-kit/
.sewing-kit
packages/*/build/ts
packages/*/build/*.tsbuildinfo
key: ${{ runner.os }}-node${{ matrix.node-version }}-sewing-kit-v1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node${{ matrix.node-version }}-sewing-kit-v1-
Expand Down

0 comments on commit 57c3b3b

Please sign in to comment.