Skip to content

Commit

Permalink
build: cache node_modules in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
daelmaak committed Feb 20, 2024
1 parent 3b47c80 commit 6ff3ee0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ jobs:
node-version: '20'
cache: 'yarn'

# TODO cache
- name: Cache node_modules
id: install-cache
uses: actions/cache@v4
with:
path: 'node_modules'
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install
if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Build
Expand All @@ -30,7 +37,6 @@ jobs:
- name: Lint
run: yarn lint

# TODO Run as separate job? Only when Install is cached
- name: Test
run: yarn test:ci

Expand Down

0 comments on commit 6ff3ee0

Please sign in to comment.