Skip to content

Commit

Permalink
Improve node_module install (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkzt authored Mar 6, 2023
1 parent b4ec9bc commit 7b7f0fd
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Use cached node_modules
id: use_cached_node_modules
uses: actions/cache@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
restore-keys: |
nodeModules-
key: nodeModules-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}

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

build:
name: build
Expand All @@ -52,13 +52,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Use cached node_modules
- name: Restore cached node_modules
uses: actions/cache/restore@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
restore-keys: |
nodeModules-
key: nodeModules-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}

- name: build
run: |
Expand All @@ -78,13 +76,11 @@ jobs:
with:
node-version: 18

- name: Use cached node_modules
- name: Restore cached node_modules
uses: actions/cache/restore@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-18
restore-keys: |
nodeModules-
key: nodeModules-18-${{ hashFiles('yarn.lock') }}

- name: lint
run: yarn lint
Expand All @@ -102,13 +98,11 @@ jobs:
with:
node-version: 18

- name: Use cached node_modules
- name: Restore cached node_modules
uses: actions/cache/restore@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-18
restore-keys: |
nodeModules-
key: nodeModules-18-${{ hashFiles('yarn.lock') }}

- name: typecheck
run: yarn typecheck
Expand All @@ -126,13 +120,11 @@ jobs:
with:
node-version: 18

- name: Use cached node_modules
- name: Restore cached node_modules
uses: actions/cache/restore@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-18
restore-keys: |
nodeModules-
key: nodeModules-18-${{ hashFiles('yarn.lock') }}

- name: generate docs
run: yarn generate:docs
Expand All @@ -151,13 +143,11 @@ jobs:
with:
node-version: 18

- name: Use cached node_modules
- name: Restore cached node_modules
uses: actions/cache/restore@v3
with:
path: node_modules
key: nodeModules-${{ hashFiles('yarn.lock') }}-18
restore-keys: |
nodeModules-
key: nodeModules-18-${{ hashFiles('yarn.lock') }}

- name: build for test
run: yarn build
Expand Down

1 comment on commit 7b7f0fd

@vercel
Copy link

@vercel vercel bot commented on 7b7f0fd Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svg-drawing – ./

svg-drawing-kmkzt.vercel.app
svg-drawing.vercel.app
svg-drawing-git-master-kmkzt.vercel.app

Please sign in to comment.