From 80476a2b61e74ffbd99439c1a606d941c54f6fbd Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 6 Jul 2022 23:38:06 +0200 Subject: [PATCH] CI: Use `npm ci` instead of `npm install` `npm ci` is recommended instead of `npm install` for automated builds. Its main advantage is the `package-lock.json` consistency check: The command fails if the lock file doesn't match `package.json`. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a2901aec..a8c609130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,12 @@ jobs: - name: Install if: ${{ matrix.flavor == 'dev'}} - run: npm install + run: npm ci working-directory: ${{ matrix.flavor }}/backend - name: Install (Prod dependencies only) if: ${{ matrix.flavor == 'prod'}} - run: npm install --prod + run: npm ci --prod working-directory: ${{ matrix.flavor }}/backend - name: Lint @@ -67,13 +67,13 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Install (Prod dependencies only) - run: npm install --prod + run: npm ci --prod if: ${{ matrix.flavor == 'prod'}} working-directory: ${{ matrix.flavor }}/frontend - name: Install if: ${{ matrix.flavor == 'dev'}} - run: npm install + run: npm ci working-directory: ${{ matrix.flavor }}/frontend - name: Lint