mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-11 19:06:36 +00:00
Consolidate continuous integration scripts
Merge before_script.sh into script.sh
This commit is contained in:
@@ -27,8 +27,6 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
bash tests/before_script.sh
|
||||
bash tests/script.sh
|
||||
run: bash tests/script.sh
|
||||
env:
|
||||
CI_PHP_VERSION: ${{ matrix.php }}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
set -x
|
||||
|
||||
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
|
||||
php -r "var_dump(phpversion());"
|
||||
php -r "var_dump(curl_version());"
|
||||
|
||||
composer self-update
|
||||
composer install --prefer-source --no-interaction
|
||||
|
||||
# Let test server know we should allow testing.
|
||||
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
|
||||
|
||||
# Start test servers. Run servers on different ports to allow simultaneous
|
||||
# requests without blocking.
|
||||
server_count=7
|
||||
for i in $(seq 0 $(("${server_count}" - 1))); do
|
||||
port=8000
|
||||
(( port += $i ))
|
||||
|
||||
php -S "127.0.0.1:${port}" -t tests/PHPCurlClass/ &
|
||||
done
|
||||
+22
-3
@@ -1,3 +1,25 @@
|
||||
set -x
|
||||
|
||||
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
|
||||
php -r "var_dump(phpversion());"
|
||||
php -r "var_dump(curl_version());"
|
||||
|
||||
composer self-update
|
||||
composer install --prefer-source --no-interaction
|
||||
|
||||
# Let test server know we should allow testing.
|
||||
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
|
||||
|
||||
# Start test servers. Run servers on different ports to allow simultaneous
|
||||
# requests without blocking.
|
||||
server_count=7
|
||||
for i in $(seq 0 $(("${server_count}" - 1))); do
|
||||
port=8000
|
||||
(( port += $i ))
|
||||
|
||||
php -S "127.0.0.1:${port}" -t tests/PHPCurlClass/ &
|
||||
done
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
@@ -34,9 +56,6 @@ errors=()
|
||||
|
||||
source "check_syntax.sh"
|
||||
|
||||
# Let test server know we should allow testing.
|
||||
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
|
||||
|
||||
# Determine which phpunit to use.
|
||||
if [[ -f "../vendor/bin/phpunit" ]]; then
|
||||
phpunit_to_use="../vendor/bin/phpunit"
|
||||
|
||||
Reference in New Issue
Block a user