Skip to content

Commit a9c7919

Browse files
committed
ci: 🎡 run separate E2E tests on different ports
1 parent 3b08183 commit a9c7919

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- run: yarn prettier:check
2424
- run: yarn lint
2525
- run: yarn test:ci --ci
26-
- run: yarn test:e2e --server http1 --suite sample-api
27-
- run: yarn test:e2e --server uws --suite sample-api
28-
- run: yarn test:e2e --server http1 --suite json-crdt-server
29-
- run: yarn test:e2e --server uws --suite json-crdt-server
26+
- run: PORT=10000 yarn test:e2e --server http1 --suite sample-api
27+
- run: PORT=10001 yarn test:e2e --server uws --suite sample-api
28+
- run: PORT=10002 yarn test:e2e --server http1 --suite json-crdt-server
29+
- run: PORT=10003 yarn test:e2e --server uws --suite json-crdt-server
3030
- run: yarn build
3131
- name: Semantic Release
3232
uses: cycjimmy/semantic-release-action@v4

src/__demos__/json-crdt-server/main-http1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {RpcServer} from '../../server/http1/RpcServer';
88
export type JsonJoyDemoRpcCaller = ReturnType<typeof createCaller>['caller'];
99

1010
const server = RpcServer.startWithDefaults({
11-
port: 9999,
11+
port: +(process.env.PORT || 9999),
1212
caller: createCaller(new Services()).caller,
1313
logger: console,
1414
});

src/__demos__/json-crdt-server/main-uws.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export type JsonJoyDemoRpcCaller = ReturnType<typeof createCaller>['caller'];
1212
const app = new RpcApp<MyCtx>({
1313
uws: App({}),
1414
caller: createCaller(new Services()).caller,
15+
port: +(process.env.PORT || 9999),
1516
});
1617
app.startWithDefaults();

src/__demos__/sample-api/main-http1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {createCaller} from '../../common/rpc/__tests__/sample-api';
55
import {RpcServer} from '../../server/http1/RpcServer';
66

77
const server = RpcServer.startWithDefaults({
8-
port: 9999,
8+
port: +(process.env.PORT || 9999),
99
caller: createCaller(),
1010
logger: console,
1111
});

src/__demos__/sample-api/main-uws.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {RpcApp} from '../../server/uws/RpcApp';
88
const app = new RpcApp({
99
uws: App({}),
1010
caller: createCaller(),
11+
port: +(process.env.PORT || 9999),
1112
});
1213

1314
app.startWithDefaults();

0 commit comments

Comments
 (0)