File tree Expand file tree Collapse file tree 5 files changed +29
-46
lines changed Expand file tree Collapse file tree 5 files changed +29
-46
lines changed Original file line number Diff line number Diff line change 2727 uses : actions/checkout@v2
2828
2929 - name : Test
30- run : |
31- bash tests/before_script.sh
32- bash tests/script.sh
30+ run : bash tests/ci.sh
3331 env :
3432 CI_PHP_VERSION : ${{ matrix.php }}
Original file line number Diff line number Diff line change 33
44use Curl \MultiCurl ;
55
6- $ server_count = 5 ;
6+ $ server_count = 7 ;
77$ urls = [];
88$ port = 8000 ;
99for ($ i = 0 ; $ i < $ server_count ; $ i ++) {
10- $ port += 1 ;
1110 $ urls [] = 'http://localhost: ' . $ port . '/ ' ;
11+ $ port += 1 ;
1212}
1313
1414$ multi_curl = new MultiCurl ();
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ set -x
2+
3+ echo " CI_PHP_VERSION: ${CI_PHP_VERSION} "
4+ php -r " var_dump(phpversion());"
5+ php -r " var_dump(curl_version());"
6+
7+ composer self-update
8+ composer install --prefer-source --no-interaction
9+
10+ # Let test server know we should allow testing.
11+ export PHP_CURL_CLASS_TEST_MODE_ENABLED=" yes"
12+
13+ # Start test servers. Run servers on different ports to allow simultaneous
14+ # requests without blocking.
15+ server_count=7
16+ for i in $( seq 0 $(( "${server_count} " - 1 )) ) ; do
17+ port=8000
18+ (( port += $i ))
19+
20+ php -S " 127.0.0.1:${port} " -t tests/PHPCurlClass/ &
21+ done
22+
123SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
224cd " ${SCRIPT_DIR} "
325
@@ -34,9 +56,6 @@ errors=()
3456
3557source " check_syntax.sh"
3658
37- # Let test server know we should allow testing.
38- export PHP_CURL_CLASS_TEST_MODE_ENABLED=" yes"
39-
4059# Determine which phpunit to use.
4160if [[ -f " ../vendor/bin/phpunit" ]]; then
4261 phpunit_to_use=" ../vendor/bin/phpunit"
Original file line number Diff line number Diff line change 180180 <a href = " https://github.com/php-curl-class/php-curl-class/releases/" >
181181 <img
182182 alt = " "
183- src = " https://img.shields.io/github/release/php-curl-class/php-curl-class.svg?style=flat-square" >
183+ src = " https://img.shields.io/github/release/php-curl-class/php-curl-class.svg?style=flat-square" / >
184184 </a >
185185 <a href = " https://github.com/php-curl-class/php-curl-class/blob/master/LICENSE" >
186186 <img
187187 alt = " "
188- src = " https://img.shields.io/github/license/php-curl-class/php-curl-class.svg?style=flat-square" >
188+ src = " https://img.shields.io/github/license/php-curl-class/php-curl-class.svg?style=flat-square" / >
189189 </a >
190190 <a href = " https://github.com/php-curl-class/php-curl-class/actions/workflows/ci.yml" >
191191 <img
192192 alt = " "
193- src = " https://img.shields.io/github/workflow/status/php-curl-class/php-curl-class/ci?style=flat-square" >
193+ src = " https://img.shields.io/github/workflow/status/php-curl-class/php-curl-class/ci?style=flat-square" / >
194194 </a >
195195 <a href = " https://github.com/php-curl-class/php-curl-class/releases/" >
196196 <img
197197 alt = " "
198- src = " https://img.shields.io/packagist/dt/php-curl-class/php-curl-class.svg?style=flat-square" >
198+ src = " https://img.shields.io/packagist/dt/php-curl-class/php-curl-class.svg?style=flat-square" / >
199199 </a >
200200 </p >
201201
You can’t perform that action at this time.
0 commit comments