From: Jérôme Benoit Date: Sat, 13 Feb 2021 15:31:01 +0000 (+0100) Subject: Cleanups (#144) X-Git-Tag: v2.0.0-beta.2~34 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1641b313a20f6d9de889498a8f04f2e4fa6ca11f;p=poolifier.git Cleanups (#144) + Run lint first at npm publication CI + Import from cluster the minimum in test Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 79728734..31b02ef4 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -17,8 +17,8 @@ jobs: with: node-version: 12 - run: npm ci - - run: npm run test - run: npm run lint + - run: npm run test - run: npm run coverage publish-npm: diff --git a/tests/worker/cluster/testWorker.js b/tests/worker/cluster/testWorker.js index fd8c5603..a8a6bb9e 100644 --- a/tests/worker/cluster/testWorker.js +++ b/tests/worker/cluster/testWorker.js @@ -1,6 +1,6 @@ 'use strict' const { ClusterWorker } = require('../../../lib/index') -const cluster = require('cluster') +const { isMaster } = require('cluster') function test (data) { for (let i = 0; i <= 50; i++) { @@ -9,7 +9,7 @@ function test (data) { } JSON.stringify(o) } - return cluster.isMaster + return isMaster } module.exports = new ClusterWorker(test, { maxInactiveTime: 500 })