Skip to content

Commit

Permalink
Enable GD with JPEG support (imagecreatefromjpeg()) in CI tests
Browse files Browse the repository at this point in the history
Needed for e107Test::testGetThumb()
  • Loading branch information
Deltik committed Mar 11, 2020
1 parent f23c2af commit e04710b
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,39 @@ jobs:
grep -m1 -P '^deb http://deb.debian.org/debian [a-z]+ main' /etc/apt/sources.list |
awk '{print $3}'
)
apt-get -t "${DEBIAN_RELEASE}-backports" install -y git zip libzip-dev
apt-get -t "${DEBIAN_RELEASE}-backports" install -y git zip libzip-dev libpng-dev libjpeg-dev
- name: PECL zip
- name: Install PHP zip extension
run: docker-php-ext-install zip

- name: PECL xdebug
- name: Configure PHP gd extension with JPEG support
run: |
if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ]
if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.4.0", ">=") ? 1 : 0;') = '1' ]
then
pecl install xdebug
docker-php-ext-configure gd --with-jpeg
else
pecl install xdebug-2.5.5
docker-php-ext-configure gd --with-jpeg-dir=/usr
fi
docker-php-ext-enable xdebug
- name: Install PHP gd extension
run: docker-php-ext-install gd

- name: Install PHP pdo_mysql extension
run: docker-php-ext-install pdo_mysql

- name: Install PHP mysqli extension
run: docker-php-ext-install mysqli

- name: PECL install xdebug
run: |
if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug
else
pecl install xdebug-2.5.5
fi
docker-php-ext-enable xdebug
- uses: actions/checkout@v2

- name: Install Composer
Expand Down

0 comments on commit e04710b

Please sign in to comment.