From 3fe5afb1dcc04bda6e54ef5675ef50cdde937f89 Mon Sep 17 00:00:00 2001 From: Sjoerd Beentjes <11621275+sjoerdbeentjes@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:27:48 +0200 Subject: [PATCH] Add Node.js caching to workflows (#138) --- .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 0ed92011..3c689deb 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: | @@ -52,6 +60,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: @@ -77,6 +93,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: