Skip to content

Commit

Permalink
config(gh-actions): add cache and cache-dependency-path
Browse files Browse the repository at this point in the history
  • Loading branch information
tams sokari committed Jan 31, 2024
1 parent acfea5f commit 0d49592
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: build application
Expand Down Expand Up @@ -54,6 +57,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: build application
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: build site
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: build site
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: lint
Expand All @@ -30,6 +33,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: lint
Expand All @@ -44,6 +50,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: lint html
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: build application
Expand All @@ -33,6 +36,9 @@ jobs:
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: ../../package-lock.json
- name: install dependencies
run: npm ci
- name: run tests
Expand Down

0 comments on commit 0d49592

Please sign in to comment.