Skip to content

Commit

Permalink
feat: add dependencies cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sfpmld committed Jul 10, 2024
1 parent b83bd25 commit e9a3a17
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
node-version: "18"
- name: info on kind of event triggering the workflow
run: echo '${{ toJSON(github.event) }}'
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.npm # npm cache folder path
# key to retrieve the cache
key: deps-node-module-${{ hashFiles('**/package-lock.json') }}
- name: install dependencies
run: npm ci # to ensure you don't install some breaking versions
- name: run linter
Expand All @@ -41,6 +47,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.npm # npm cache folder path
# key to retrieve the cache
key: deps-node-module-${{ hashFiles('**/package-lock.json') }}
- name: install dependencies
run: npm ci # to ensure you don't install some breaking versions
- name: Run tests
Expand All @@ -59,6 +71,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.npm # npm cache folder path
# key to retrieve the cache
key: deps-node-module-${{ hashFiles('**/package-lock.json') }}
- name: install dependencies
run: npm ci # to ensure you don't install some breaking versions
- name: Build code
Expand Down

0 comments on commit e9a3a17

Please sign in to comment.