Skip to content

Commit 4bb44f5

Browse files
ci: one workflow per workspace
1 parent c5bda60 commit 4bb44f5

14 files changed

Lines changed: 582 additions & 123 deletions

.github/workflows/ci-browser.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI (engine.io-client)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/engine.io/**'
9+
- 'packages/engine.io-client/**'
10+
- 'packages/engine.io-parser/**'
11+
- 'packages/socket.io-component-emitter/**'
12+
- '.github/workflows/ci-engine.io-client.yml'
13+
pull_request:
14+
paths:
15+
- 'packages/engine.io/**'
16+
- 'packages/engine.io-client/**'
17+
- 'packages/engine.io-parser/**'
18+
- 'packages/socket.io-component-emitter/**'
19+
- '.github/workflows/ci-engine.io-client.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
test:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 20
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v6
32+
33+
- name: Use Node.js 24
34+
uses: actions/setup-node@v6
35+
with:
36+
node-version: 24
37+
cache: npm
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Compile dependencies
43+
run: |
44+
npm run compile \
45+
--workspace=engine.io-parser
46+
47+
- name: Compile package
48+
run: npm run compile --workspace=engine.io-client
49+
50+
- name: Compile dev dependencies
51+
run: |
52+
npm run compile \
53+
--workspace=engine.io
54+
55+
- name: Run tests
56+
run: npm test --workspace=engine.io-client
57+
58+
- name: Run tests with fetch instead of XHR
59+
run: npm run test:node-fetch --workspace=engine.io-client
60+
61+
- name: Run tests with Node.js native WebSocket
62+
run: npm run test:node-builtin-ws --workspace=engine.io-client
63+
64+
- name: Run tests in browser
65+
if: github.event_name == 'push'
66+
run: npm test --workspace=engine.io-client
67+
env:
68+
BROWSERS: 1
69+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
70+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI (engine.io-parser)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/engine.io-parser/**'
9+
- '.github/workflows/ci-engine.io-parser.yml'
10+
pull_request:
11+
paths:
12+
- 'packages/engine.io-parser/**'
13+
- '.github/workflows/ci-engine.io-parser.yml'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v6
26+
27+
- name: Use Node.js 24
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: 24
31+
cache: npm
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Compile package
37+
run: npm run compile --workspace=engine.io-parser
38+
39+
- name: Run tests
40+
run: npm test --workspace=engine.io-parser
41+
42+
- name: Run browser tests
43+
if: github.event_name == 'push'
44+
run: npm test --workspace=engine.io-parser
45+
env:
46+
BROWSERS: 1
47+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
48+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}

.github/workflows/ci-engine.io.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ jobs:
4545
--workspace=engine.io-parser
4646
4747
- name: Compile package
48-
run: |
49-
npm run compile --workspace=engine.io
48+
run: npm run compile --workspace=engine.io
5049

5150
- name: Compile dev dependencies
5251
run: |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI (socket.io-adapter)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/socket.io-adapter/**'
9+
- '.github/workflows/ci-socket.io-adapter.yml'
10+
pull_request:
11+
paths:
12+
- 'packages/socket.io-adapter/**'
13+
- '.github/workflows/ci-socket.io-adapter.yml'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v6
26+
27+
- name: Use Node.js 24
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: 24
31+
cache: npm
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Compile package
37+
run: npm run compile --workspace=socket.io-adapter
38+
39+
- name: Run tests
40+
run: npm test --workspace=socket.io-adapter
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI (socket.io-client))
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/engine.io/**'
9+
- 'packages/engine.io-client/**'
10+
- 'packages/engine.io-parser/**'
11+
- 'packages/socket.io/**'
12+
- 'packages/socket.io-adapter/**'
13+
- 'packages/socket.io-client/**'
14+
- 'packages/socket.io-component-emitter/**'
15+
- 'packages/socket.io-parser/**'
16+
- '.github/workflows/ci-socket.io-client.yml'
17+
pull_request:
18+
paths:
19+
- 'packages/engine.io/**'
20+
- 'packages/engine.io-client/**'
21+
- 'packages/engine.io-parser/**'
22+
- 'packages/socket.io/**'
23+
- 'packages/socket.io-adapter/**'
24+
- 'packages/socket.io-client/**'
25+
- 'packages/socket.io-component-emitter/**'
26+
- 'packages/socket.io-parser/**'
27+
- '.github/workflows/ci-socket.io-client.yml'
28+
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
test:
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 20
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v6
40+
41+
- name: Use Node.js 24
42+
uses: actions/setup-node@v6
43+
with:
44+
node-version: 24
45+
cache: npm
46+
47+
- name: Install dependencies
48+
run: npm ci
49+
50+
- name: Compile dependencies
51+
run: |
52+
npm run compile \
53+
--workspace=engine.io-client \
54+
--workspace=socket.io-parser
55+
56+
- name: Compile package
57+
run: npm run compile --workspace=socket.io-client
58+
59+
- name: Compile dev dependencies
60+
run: |
61+
npm run compile \
62+
--workspace=socket.io
63+
64+
- name: Run tests
65+
run: npm test --workspace=socket.io-client
66+
67+
- name: Run browser tests
68+
if: github.event_name == 'push'
69+
run: npm test --workspace=socket.io-client
70+
env:
71+
BROWSERS: 1
72+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
73+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI (socket.io-cluster-adapter)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/socket.io-cluster-adapter/**'
9+
- '.github/workflows/ci-socket.io-cluster-adapter.yml'
10+
pull_request:
11+
paths:
12+
- 'packages/socket.io-cluster-adapter/**'
13+
- '.github/workflows/ci-socket.io-cluster-adapter.yml'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v6
26+
27+
- name: Use Node.js 24
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: 24
31+
cache: npm
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Compile package
37+
run: npm run compile --workspace=socket.io-cluster-adapter
38+
39+
- name: Run tests
40+
run: npm test --workspace=socket.io-cluster-adapter
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI (socket.io-cluster-engine)
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'packages/engine.io/**'
9+
- 'packages/engine.io-parser/**'
10+
- 'packages/socket.io-cluster-engine/**'
11+
- '.github/workflows/ci-socket.io-cluster-engine.yml'
12+
pull_request:
13+
paths:
14+
- 'packages/engine.io/**'
15+
- 'packages/engine.io-parser/**'
16+
- 'packages/socket.io-cluster-engine/**'
17+
- '.github/workflows/ci-socket.io-cluster-engine.yml'
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
test:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 10
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v6
30+
31+
- name: Use Node.js 24
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: 24
35+
cache: npm
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Compile dependencies
41+
run: |
42+
npm run compile \
43+
--workspace=engine.io \
44+
--workspace=engine.io-parser
45+
46+
- name: Compile package
47+
run: npm run compile --workspace=socket.io-cluster-engine
48+
49+
- name: Run tests
50+
run: npm test --workspace=socket.io-cluster-engine

0 commit comments

Comments
 (0)