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`.
This commit is contained in:
Erik Arvstedt 2022-07-06 23:38:06 +02:00
parent 78ee671051
commit 80476a2b61

View file

@ -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