Skip to content

Commit

Permalink
build: cache dependencies in lint_changed_files workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Burckhardt <[email protected]>
  • Loading branch information
Planeshifter authored Jan 12, 2025
1 parent e661213 commit abf124e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/lint_changed_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,21 @@ jobs:
node-version: '20' # 'lts/*'
timeout-minutes: 5

# Cache dependencies:
- name: 'Cache dependencies'
# Pin action to full length commit SHA
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
id: cache
with:
path: |
${{ github.workspace }}/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
- name: 'Install dependencies'
if: steps.cache.outputs.cache-hit != 'true'
run: |
make install-node-modules || make install-node-modules || make install-node-modules
timeout-minutes: 15
Expand Down

0 comments on commit abf124e

Please sign in to comment.