diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 3399e87..1d3f1b6 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -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 @@ -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 @@ -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