diff --git a/.github/workflows/examples-ci.yml b/.github/workflows/examples-ci.yml index 609782672e..fba4fce3fe 100644 --- a/.github/workflows/examples-ci.yml +++ b/.github/workflows/examples-ci.yml @@ -44,9 +44,9 @@ jobs: path: ~/.npm key: examples-node-v1-${{ hashFiles('**/package-lock.json') }} - - name: (npm) ${{ matrix.example }} install using npm i + - name: (npm) ${{ matrix.example }} install using npm ci if: steps.use-yarn.outputs.lockfile != 'yarn.lock' - run: npm install + run: npm ci working-directory: examples/${{ matrix.example }} - name: (npm) ${{ matrix.example }} test diff --git a/ci/Jenkinsfile.gh-pages b/ci/Jenkinsfile.gh-pages index 7a621ba5ef..58437b1df2 100644 --- a/ci/Jenkinsfile.gh-pages +++ b/ci/Jenkinsfile.gh-pages @@ -19,7 +19,7 @@ pipeline { stages { stage('Deps') { steps { - sh 'npm install' + sh 'npm ci' } } @@ -64,7 +64,7 @@ pipeline { def buildExample(example=STAGE_NAME) { def dest = "${WORKSPACE}/build/docs/examples/${example}" dir("examples/${example}") { - sh 'npm install' + sh 'npm ci' sh 'npm run build' sh "mkdir -p ${dest}" sh "cp -r build/. ${dest}" diff --git a/package.json b/package.json index c5ade17bd7..79fcebc534 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "pretest": "run-s pretest:*", "pretest:1-init-git-submodules": "[ -f './nim-waku/build/wakunode2' ] || git submodule update --init --recursive", "pretest:2-build-nim-waku": "[ -f './nim-waku/build/wakunode2' ] || run-s nim-waku:build", - "examples:pretest": "for d in examples/*/; do (cd $d && npm install); done", + "examples:pretest": "for d in examples/*/; do (cd $d && npm ci); done", "nim-waku:build": "(cd nim-waku; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$(nproc --all 2>/dev/null || echo 2) wakunode2)", "nim-waku:force-build": "(cd nim-waku && rm -rf ./build/ ./vendor && make -j$(nproc --all 2>/dev/null || echo 2) update) && run-s nim-waku:build", "test": "run-s test:*",