diff --git a/.github/workflows/nodejs-lib-cluster.yml b/.github/workflows/nodejs-lib-cluster1.yml similarity index 64% rename from .github/workflows/nodejs-lib-cluster.yml rename to .github/workflows/nodejs-lib-cluster1.yml index 0b7c542078..0f79275019 100644 --- a/.github/workflows/nodejs-lib-cluster.yml +++ b/.github/workflows/nodejs-lib-cluster1.yml @@ -1,4 +1,4 @@ -name: CI lib/cluster +name: CI lib/cluster1 on: push: @@ -11,8 +11,8 @@ jobs: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '18.19.0, 18, 20, 22' - test: 'npm run ci:lib/cluster' + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' + test: 'npm run ci:lib/cluster1' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/nodejs-lib-cluster2.yml b/.github/workflows/nodejs-lib-cluster2.yml new file mode 100644 index 0000000000..5ceda285b8 --- /dev/null +++ b/.github/workflows/nodejs-lib-cluster2.yml @@ -0,0 +1,18 @@ +name: CI lib/cluster2 + +on: + push: + branches: [ master, next ] + pull_request: + branches: [ master, next ] + +jobs: + Job: + name: Node.js + uses: node-modules/github-actions/.github/workflows/node-test.yml@master + with: + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' + test: 'npm run ci:lib/cluster2' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/nodejs-lib-core.yml b/.github/workflows/nodejs-lib-core.yml index 64885255d2..e419f6c80b 100644 --- a/.github/workflows/nodejs-lib-core.yml +++ b/.github/workflows/nodejs-lib-core.yml @@ -11,8 +11,8 @@ jobs: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '18.19.0, 18, 20, 22' + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' test: 'npm run ci:lib/core' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/nodejs-lib-other.yml b/.github/workflows/nodejs-lib-other.yml index e6d94c54d2..e176cd7e40 100644 --- a/.github/workflows/nodejs-lib-other.yml +++ b/.github/workflows/nodejs-lib-other.yml @@ -11,8 +11,8 @@ jobs: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '18.19.0, 18, 20, 22' + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' test: 'npm run ci:lib/other' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/nodejs-lib-plugins.yml b/.github/workflows/nodejs-lib-plugins.yml index b1603cae5d..3eb32b4b68 100644 --- a/.github/workflows/nodejs-lib-plugins.yml +++ b/.github/workflows/nodejs-lib-plugins.yml @@ -11,8 +11,8 @@ jobs: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '18.19.0, 18, 20, 22' + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' test: 'npm run ci:lib/plugins' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/nodejs-other.yml b/.github/workflows/nodejs-other.yml index 845f6e8e94..7b71ff1079 100644 --- a/.github/workflows/nodejs-other.yml +++ b/.github/workflows/nodejs-other.yml @@ -11,8 +11,8 @@ jobs: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '18.19.0, 18, 20, 22' + os: 'ubuntu-latest, windows-latest' + version: '18, 20, 22' test: 'npm run ci:lib/other' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/package.json b/package.json index da9f24dc3e..8121e8abaa 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,8 @@ "postci": "npm run prepublishOnly && npm run clean", "prepublishOnly": "tshy && tshy-after && attw --pack --profile node16", "ci:app": "npm run ci \"test/app/**/*.test.ts\"", - "ci:lib/cluster": "npm run ci \"test/lib/cluster/**/*.test.ts\"", + "ci:lib/cluster1": "npm run ci \"test/lib/cluster1/**/*.test.ts\"", + "ci:lib/cluster2": "npm run ci \"test/lib/cluster2/**/*.test.ts\"", "ci:lib/core": "npm run ci \"test/lib/core/**/*.test.ts\"", "ci:lib/plugins": "npm run ci \"test/lib/plugins/**/*.test.ts\"", "ci:lib/other": "npm run ci \"test/lib/*.test.ts\"", diff --git a/test/lib/cluster/app_worker.test.ts b/test/lib/cluster1/app_worker.test.ts similarity index 98% rename from test/lib/cluster/app_worker.test.ts rename to test/lib/cluster1/app_worker.test.ts index 2ed12bb857..389e05447b 100644 --- a/test/lib/cluster/app_worker.test.ts +++ b/test/lib/cluster1/app_worker.test.ts @@ -13,7 +13,7 @@ const DEFAULT_BAD_REQUEST_HTML = ` `; -describe('test/lib/cluster/app_worker.test.ts', () => { +describe('test/lib/cluster1/app_worker.test.ts', () => { let app: MockApplication; before(() => { app = cluster('apps/app-server'); diff --git a/test/lib/cluster/cluster-client-error.test.ts b/test/lib/cluster1/cluster-client-error.test.ts similarity index 92% rename from test/lib/cluster/cluster-client-error.test.ts rename to test/lib/cluster1/cluster-client-error.test.ts index 0ad2f5f2b9..d784d25666 100644 --- a/test/lib/cluster/cluster-client-error.test.ts +++ b/test/lib/cluster1/cluster-client-error.test.ts @@ -3,7 +3,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; import { MockApplication, createApp, getFilepath } from '../../utils.js'; -describe('test/lib/cluster/cluster-client-error.test.ts', () => { +describe('test/lib/cluster1/cluster-client-error.test.ts', () => { let app: MockApplication; before(async () => { app = createApp('apps/cluster-client-error'); diff --git a/test/lib/cluster/cluster-client.test.ts b/test/lib/cluster1/cluster-client.test.ts similarity index 97% rename from test/lib/cluster/cluster-client.test.ts rename to test/lib/cluster1/cluster-client.test.ts index eb9f81d284..754b27e53f 100644 --- a/test/lib/cluster/cluster-client.test.ts +++ b/test/lib/cluster1/cluster-client.test.ts @@ -4,7 +4,7 @@ import { MockApplication, createApp, singleProcessApp } from '../../utils.js'; const innerClient = Symbol.for('ClusterClient#innerClient'); -describe('test/lib/cluster/cluster-client.test.ts', () => { +describe('test/lib/cluster1/cluster-client.test.ts', () => { let app: MockApplication; describe('common mode', () => { before(async () => { diff --git a/test/lib/cluster/master.test.ts b/test/lib/cluster2/master.test.ts similarity index 99% rename from test/lib/cluster/master.test.ts rename to test/lib/cluster2/master.test.ts index fa9b142330..533153281b 100644 --- a/test/lib/cluster/master.test.ts +++ b/test/lib/cluster2/master.test.ts @@ -3,7 +3,7 @@ import { mm } from '@eggjs/mock'; import coffee, { Coffee } from 'coffee'; import { MockApplication, cluster, getFilepath } from '../../utils.js'; -describe('test/lib/cluster/master.test.ts', () => { +describe('test/lib/cluster2/master.test.ts', () => { afterEach(mm.restore); describe('app worker die', () => {