Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/tests-mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
- "7.3"
- "7.4"
include:
- php: "5.3"
phpunit: "4"
- php: "5.4"
phpunit: "4"
- php: "5.5"
phpunit: "4"
- php: "5.6"
phpunit: "4"
- php: "7.0"
phpunit: "6"

Expand All @@ -39,14 +47,15 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xdebug, xhprof, mongodb, tideways_xhprof
extensions: xdebug, xhprof, mongo, mongodb, tideways_xhprof

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
composer remove alcaeus/mongo-php-adapter --no-update --dev
composer install --prefer-dist
composer require --dev phpunit/phpunit:^$PHPUNIT_VERSION

- name: Install extensions
Expand Down
21 changes: 14 additions & 7 deletions install-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ has_extension() {
}

install_xhprof() {
local version="${1:-stable}"
local ext="xhprof" version="${1:-stable}"

has_extension "xhprof" && return 0
pecl install xhprof-$version
has_extension "$ext" && return 0
# https://github.com/shivammathur/setup-php/issues/905
sudo rm -rf /tmp/pear # shivammathur's leftovers...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Allow installing to /usr/local/php
sudo chown -R "$(id -un):" /usr/local/php/
pecl install "$ext-$version"
}

install_mongo() {
echo no | pecl install mongo
local ext="mongo" version="${1:-stable}"

has_extension "$ext" && return 0
echo no | pecl install "$ext-$version"
}

install_mongodb() {
Expand Down Expand Up @@ -58,13 +65,13 @@ install_tideways_xhprof() {
has_extension "$extension"
}

# Show php config paths
php --ini
pecl version
php -m

case "$(uname -s):$PHP_VERSION" in
*:5.*)
install_xhprof 0.9.4
install_mongo
install_mongo 1.6.16
;;
Linux:7.*|Linux:8.*)
install_xhprof
Expand Down