From f102faf53e704dd5154120bb3d21f0e584133919 Mon Sep 17 00:00:00 2001 From: Michael Levin Date: Wed, 21 Feb 2024 09:36:22 -0500 Subject: [PATCH] Remove duplicated caching logic from workflows --- .github/workflows/ci.yml | 34 ++++------------------------------ .github/workflows/deploy.yml | 17 ++--------------- 2 files changed, 6 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0e85b7..b270d20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,21 +13,8 @@ jobs: with: node-version: "lts/*" cache: 'npm' - - name: Create Checksum of package.json - run: echo PACKAGE_CHECKSUM="$(shasum package.json | awk '{ print $1 }')" >> "$GITHUB_ENV" - - name: Restore Cache - uses: actions/cache/restore@v4 - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} - - name: Install Dependencies - run: npm install - - name: Save Cache - uses: actions/cache/save@v4 - id: cache - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} + - name: install dependencies + run: npm ci - name: lint javascript run: npm run lint test: @@ -56,21 +43,8 @@ jobs: with: node-version: "lts/*" cache: 'npm' - - name: Create Checksum of package.json - run: echo PACKAGE_CHECKSUM="$(shasum package.json | awk '{ print $1 }')" >> "$GITHUB_ENV" - - name: Restore Cache - uses: actions/cache/restore@v4 - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} - - name: Install Dependencies - run: npm install - - name: Save Cache - uses: actions/cache/save@v4 - id: cache - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} + - name: install dependencies + run: npm ci - name: run tests run: npm test deploy_dev: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69635cf..889de9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,21 +46,8 @@ jobs: with: node-version: "lts/*" cache: 'npm' - - name: Create Checksum of package.json - run: echo PACKAGE_CHECKSUM="$(shasum package.json | awk '{ print $1 }')" >> "$GITHUB_ENV" - - name: Restore Cache - uses: actions/cache/restore@v4 - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} - - name: Install Dependencies - run: npm install - - name: Save Cache - uses: actions/cache/save@v4 - id: cache - with: - path: ./node_modules - key: v1-dependencies-${{ env.PACKAGE_CHECKSUM }} + - name: install dependencies + run: npm ci - name: Replace env vars in manifest.yml file run: | sudo apt-get update