File tree Expand file tree Collapse file tree 5 files changed +39
-8
lines changed Expand file tree Collapse file tree 5 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ PHPUnit :
9+ name : PHPUnit (PHP ${{ matrix.php }} on ${{ matrix.os }})
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os :
14+ - ubuntu-20.04
15+ php :
16+ - 8.0
17+ - 7.4
18+ - 7.3
19+ steps :
20+ - uses : actions/checkout@v2
21+ - uses : shivammathur/setup-php@v2
22+ with :
23+ php-version : ${{ matrix.php }}
24+ - run : composer install
25+ - run : sh test/ab/run_ab_tests.sh
26+ - run : vendor/bin/phpunit
Original file line number Diff line number Diff line change 33
44echo " Running $0 "
55
6- echo Adding " $1 host.ratchet .internal" to /etc/hosts file
6+ echo Adding " $1 host.dock .internal" to /etc/hosts file
77
8- echo $1 host.ratchet .internal >> /etc/hosts
8+ echo $1 host.dock .internal >> /etc/hosts
99
1010echo /etc/hosts contains:
1111cat /etc/hosts
Original file line number Diff line number Diff line change 44
55 "servers" : [
66 {"agent" : " RxWebsocketServer/0.0.0" ,
7- "url" : " ws://host.docker .internal:9001 " ,
7+ "url" : " ws://host.dock .internal:9002 " ,
88 "options" : {"version" : 18 }}
99 ],
1010 "cases" : [" *" ],
Original file line number Diff line number Diff line change @@ -10,23 +10,28 @@ docker run --rm \
1010sleep 10
1111php -d memory_limit=256M clientRunner.php
1212
13- docker stop rxwsfuzzingserver
1413
1514
16- sleep 5
15+ sleep 10
1716
1817
1918php -d memory_limit=256M testServer.php &
2019SERVER_PID=$!
2120sleep 3
2221
22+ if [ " $RUNNER_OS " = " Linux" ]; then
23+ IPADDR=` hostname -I | cut -f 1 -d ' ' `
24+ else
25+ IPADDR=` ifconfig | grep " inet " | grep -Fv 127.0.0.1 | awk ' {print $2}' | head -1 | tr -d ' adr:' `
26+ fi
27+
2328docker run --rm \
2429 \
2530 -v ${PWD} :/config \
2631 -v ${PWD} /reports:/reports \
27- -p 9001:9001 \
2832 --name rxwsfuzzingclient \
29- crossbario/autobahn-testsuite wstest -m fuzzingclient -s /config/fuzzingclient.json
33+ crossbario/autobahn-testsuite /bin/sh -c " sh /config/docker_bootstrap.sh $IPADDR ; wstest -m fuzzingclient -s /config/fuzzingclient.json"
34+
3035sleep 12
3136
3237kill $SERVER_PID
Original file line number Diff line number Diff line change 1111 $ timerObservable = Observable::timer (1000 * $ argv [1 ]);
1212}
1313
14- $ server = new \Rx \Websocket \Server ("tcp://0.0.0.0:9001 " , true );
14+ $ server = new \Rx \Websocket \Server ("tcp://0.0.0.0:9002 " , true );
1515
1616$ server
1717 ->takeUntil ($ timerObservable )
You can’t perform that action at this time.
0 commit comments