Skip to content

Commit

Permalink
ci: implement npm cache
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Dec 23, 2024
1 parent 98f1d18 commit 1988d63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ jobs:
with:
node-version: "20"

- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
- name: Install dependencies
run: npm install

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ jobs:
with:
node-version: "20"

- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
- name: Install dependencies
run: npm install

- name: Run format check
run: npm run format
run: |
npm run format

0 comments on commit 1988d63

Please sign in to comment.