Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 20, 2025
1 parent 8686daf commit 13541fd
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI lib/cluster
name: CI lib/cluster1

on:
push:
Expand All @@ -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 }}
18 changes: 18 additions & 0 deletions .github/workflows/nodejs-lib-cluster2.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-lib-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-lib-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-lib-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/nodejs-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DEFAULT_BAD_REQUEST_HTML = `<html>
</body>
</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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 13541fd

Please sign in to comment.