From af79c968cdee25f657458e3f48b280d58f611096 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Mon, 12 Dec 2022 20:41:40 +0100 Subject: [PATCH] npm install is faster than npm ci (#33459) --- .github/workflows/code-lint.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-lint.yml b/.github/workflows/code-lint.yml index a13aad23f51e..c4b0ef2563e9 100644 --- a/.github/workflows/code-lint.yml +++ b/.github/workflows/code-lint.yml @@ -18,6 +18,8 @@ on: - .eslintrc.cjs # In case something like eslint or tsc or prettier upgrades - 'package-lock.json' + # In case one of the script definitions changed + - 'package.json' # Ultimately, for debugging this workflow itself - .github/workflows/code-lint.yml @@ -37,6 +39,12 @@ jobs: - name: Check out repo uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - name: Cache node_modules + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }} + - name: Setup node uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 with: @@ -44,7 +52,7 @@ jobs: cache: npm - name: Install dependencies - run: npm ci + run: npm install --prefer-offline --no-audit --ignore-scripts - name: Run linter run: npm run lint