From e86a5bcc04b3b945b19ac6d2fad110fcbf6e099a Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Mon, 20 Nov 2023 17:34:42 -0500 Subject: [PATCH 1/3] add cache action to lint workflow --- .github/workflows/lint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f49c3f1317b..16fc92ceb79 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,8 +12,16 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18.12.0' + + - name: Cache Node Modules + uses: actions/cache@v3 + id: cache-node-mods + with: + path: node_modules + key: node-modules-cache-v3-${{ hashFiles('package.json', 'package-lock.json') }} - name: Install Packages + if: steps.cache-node-mods.outputs.cache-hit != 'true' run: cd website && npm ci - name: Run ESLint From 8f7543ce61c85a329676aa292a41a2411258206d Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Mon, 20 Nov 2023 17:37:28 -0500 Subject: [PATCH 2/3] update cache path and remove unused package-lock in root --- .github/workflows/lint.yml | 4 ++-- package-lock.json | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 package-lock.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 16fc92ceb79..5e91cd899ab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,8 +17,8 @@ jobs: uses: actions/cache@v3 id: cache-node-mods with: - path: node_modules - key: node-modules-cache-v3-${{ hashFiles('package.json', 'package-lock.json') }} + path: website/node_modules + key: node-modules-cache-v3-${{ hashFiles('**/package.json', '**/package-lock.json') }} - name: Install Packages if: steps.cache-node-mods.outputs.cache-hit != 'true' diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 058db9205e2..00000000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "docs.getdbt.com", - "lockfileVersion": 2, - "requires": true, - "packages": {} -} From 5e075bb6668e321d5c8016ba8c1eb74a989a759b Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Mon, 20 Nov 2023 17:39:55 -0500 Subject: [PATCH 3/3] should use cached node mods