From c1a363a8e09feb4c432c2f19a817f8852dec4371 Mon Sep 17 00:00:00 2001 From: David Rogers Date: Tue, 5 Nov 2024 12:49:58 -0800 Subject: [PATCH] ci: update run-checks to cache .npm cache and named steps (#2504) (#2505) ci: update run-checks to cache node_modules and named steps (#2504) --- .github/workflows/run-checks.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-checks.yml b/.github/workflows/run-checks.yml index 0c4dbf4e1..b4e4a5873 100644 --- a/.github/workflows/run-checks.yml +++ b/.github/workflows/run-checks.yml @@ -9,8 +9,18 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.10.0" - - run: | - npm ci - npm run check-format - npm run lint - npx tsc --noEmit + - name: Cache npm cache + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + - name: Install dependencies + run: npm ci + - name: Next.js Build + run: npm run build-prod:data-portal + - name: Run Prettier + run: npm run check-format + - name: Run Linter (ESLint) + run: npm run lint + - name: Type Check + run: npx tsc --noEmit