From 48c721e4695f0569b2cb1aace1f558b542d0d71d Mon Sep 17 00:00:00 2001 From: sjoerdbeentjes <11621275+sjoerdbeentjes@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:45:38 +0200 Subject: [PATCH] Add Node.js caching to workflows --- .github/workflows/main-migrations.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/main-migrations.yaml b/.github/workflows/main-migrations.yaml index 86f60d5a..4f9b2f3d 100644 --- a/.github/workflows/main-migrations.yaml +++ b/.github/workflows/main-migrations.yaml @@ -14,6 +14,14 @@ jobs: with: fetch-depth: 0 + - name: Cache Node.js modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Check for changes in migrations folder id: check_changes run: | @@ -51,6 +59,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache Node.js modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -76,6 +92,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache Node.js modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Set up Node.js uses: actions/setup-node@v4 with: