Skip to content

Commit d1841dc

Browse files
committed
fix: stabilize parity workflow deps
1 parent 4e4e002 commit d1841dc

4 files changed

Lines changed: 59 additions & 37 deletions

File tree

.github/workflows/lang-parity-php-swift.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 18
31+
- name: Install ws for protocol host
32+
run: npm install ws@8
33+
working-directory: ruby/tests
2834
- uses: ruby/setup-ruby@v1
2935
with:
3036
ruby-version: '3.2'
3137
bundler-cache: true
3238
working-directory: ruby
33-
- uses: actions/setup-node@v4
34-
with:
35-
node-version: 18
3639
- name: Run Ruby parity tests
3740
working-directory: ruby
3841
run: bundle exec ruby -Ilib tests/test_client.rb
@@ -60,6 +63,9 @@ jobs:
6063
- uses: actions/setup-node@v4
6164
with:
6265
node-version: 18
66+
- name: Install ws for protocol host
67+
run: npm install ws@8
68+
working-directory: java/src/test/resources
6369
- uses: actions/setup-java@v4
6470
with:
6571
distribution: temurin
@@ -73,6 +79,12 @@ jobs:
7379
runs-on: ubuntu-latest
7480
steps:
7581
- uses: actions/checkout@v4
82+
- uses: actions/setup-node@v4
83+
with:
84+
node-version: 18
85+
- name: Install ws for protocol host
86+
run: npm install ws@8
87+
working-directory: php/tests
7688
- name: Setup PHP
7789
uses: shivammathur/setup-php@v2
7890
with:
@@ -89,6 +101,12 @@ jobs:
89101
runs-on: macos-latest
90102
steps:
91103
- uses: actions/checkout@v4
104+
- uses: actions/setup-node@v4
105+
with:
106+
node-version: 18
107+
- name: Install ws for protocol host
108+
run: npm install ws@8
109+
working-directory: swift/Tests
92110
- name: Run Swift parity tests
93111
working-directory: swift
94112
run: swift test
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace CodeBridge;
4+
5+
class BridgeConfig {
6+
public string $url;
7+
public string $secret;
8+
public ?string $projectId;
9+
public array $capabilities;
10+
public int $heartbeatIntervalMs;
11+
public int $heartbeatTimeoutMs;
12+
public int $backoffInitialMs;
13+
public int $backoffMaxMs;
14+
public int $bufferLimit;
15+
16+
public function __construct(
17+
string $url,
18+
string $secret,
19+
?string $projectId = null,
20+
array $capabilities = ['console', 'error', 'navigation', 'network'],
21+
int $heartbeatIntervalMs = 15000,
22+
int $heartbeatTimeoutMs = 30000,
23+
int $backoffInitialMs = 1000,
24+
int $backoffMaxMs = 30000,
25+
int $bufferLimit = 200
26+
) {
27+
$this->url = $url;
28+
$this->secret = $secret;
29+
$this->projectId = $projectId;
30+
$this->capabilities = $capabilities;
31+
$this->heartbeatIntervalMs = $heartbeatIntervalMs;
32+
$this->heartbeatTimeoutMs = $heartbeatTimeoutMs;
33+
$this->backoffInitialMs = $backoffInitialMs;
34+
$this->backoffMaxMs = $backoffMaxMs;
35+
$this->bufferLimit = $bufferLimit;
36+
}
37+
}

php/src/CodeBridge/Client.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,6 @@
55
use WebSocket\Client as WSClient;
66
use WebSocket\ConnectionException;
77

8-
class BridgeConfig {
9-
public string $url;
10-
public string $secret;
11-
public ?string $projectId;
12-
public array $capabilities;
13-
public int $heartbeatIntervalMs;
14-
public int $heartbeatTimeoutMs;
15-
public int $backoffInitialMs;
16-
public int $backoffMaxMs;
17-
public int $bufferLimit;
18-
19-
public function __construct(
20-
string $url,
21-
string $secret,
22-
?string $projectId = null,
23-
array $capabilities = ['console', 'error', 'navigation', 'network'],
24-
int $heartbeatIntervalMs = 15000,
25-
int $heartbeatTimeoutMs = 30000,
26-
int $backoffInitialMs = 1000,
27-
int $backoffMaxMs = 30000,
28-
int $bufferLimit = 200
29-
) {
30-
$this->url = $url;
31-
$this->secret = $secret;
32-
$this->projectId = $projectId;
33-
$this->capabilities = $capabilities;
34-
$this->heartbeatIntervalMs = $heartbeatIntervalMs;
35-
$this->heartbeatTimeoutMs = $heartbeatTimeoutMs;
36-
$this->backoffInitialMs = $backoffInitialMs;
37-
$this->backoffMaxMs = $backoffMaxMs;
38-
$this->bufferLimit = $bufferLimit;
39-
}
40-
}
41-
428
class Client {
439
private ?WSClient $ws = null;
4410
private BridgeConfig $config;

ruby/Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ GEM
1414

1515
PLATFORMS
1616
arm64-darwin-25
17+
x86_64-linux
1718

1819
DEPENDENCIES
1920
minitest (~> 5.22)

0 commit comments

Comments
 (0)