Skip to content

Commit 22eb934

Browse files
authored
Merge pull request php-curl-class#665 from zachborboa/master
Housekeeping
2 parents 23e072c + 3305e9c commit 22eb934

File tree

5 files changed

+29
-46
lines changed

5 files changed

+29
-46
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
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 }}

examples/multi_curl_get_load_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
use Curl\MultiCurl;
55

6-
$server_count = 5;
6+
$server_count = 7;
77
$urls = [];
88
$port = 8000;
99
for ($i = 0; $i < $server_count; $i++) {
10-
$port += 1;
1110
$urls[] = 'http://localhost:' . $port . '/';
11+
$port += 1;
1212
}
1313

1414
$multi_curl = new MultiCurl();

tests/before_script.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/script.sh renamed to tests/ci.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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+
123
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
224
cd "${SCRIPT_DIR}"
325

@@ -34,9 +56,6 @@ errors=()
3456

3557
source "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.
4160
if [[ -f "../vendor/bin/phpunit" ]]; then
4261
phpunit_to_use="../vendor/bin/phpunit"

www/index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,22 @@
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

0 commit comments

Comments
 (0)