Skip to content

Commit

Permalink
Agrega cache para las dependencias de node
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioDiGulio committed Nov 5, 2023
1 parent b4a900f commit 43d955f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
with:
node-version: 14

- name: Restaurar caché de node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
if: steps.test.outputs.cache-hit != 'true'

- name: Instalar dependencias
run: npm install
working-directory: ./web
Expand All @@ -28,6 +35,15 @@ jobs:
run: npm run test
working-directory: ./web

- name: Guardar caché de node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
web-build:
runs-on: ubuntu-latest
needs: web-test
Expand All @@ -40,6 +56,13 @@ jobs:
with:
node-version: 14

- name: Restaurar caché de node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
if: steps.build.outputs.cache-hit != 'true'

- name: Instalar dependencias
run: npm install
working-directory: ./web
Expand Down

0 comments on commit 43d955f

Please sign in to comment.