Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup Project
description: Setup Node.js, restore build cache, and setup Yarn
description: Setup Node.js, install dependencies, and build the workspace

inputs:
node-version:
Expand All @@ -15,16 +15,20 @@ runs:
with:
node-version: ${{ inputs.node-version }}

- name: Restore build outputs
# Cache dependencies only (not build outputs). Keyed on the lockfile, so it is
# stable and reused across commits. Build outputs are intentionally NOT cached
# across jobs: every job builds its own dist below. Relying on a cross-job cache
# to carry **/dist proved unreliable (read-after-write inconsistency between the
# build job and downstream lint/test jobs left them with missing dist).
- name: Restore dependencies
id: cache
uses: actions/cache@v4
with:
path: |
.yarn
node_modules
**/node_modules
**/dist
key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}-${{ github.sha }}
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }}

- name: Enable Corepack
shell: bash
Expand All @@ -33,4 +37,8 @@ runs:
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Build workspace
shell: bash
run: yarn build
Loading