mirror of
https://github.com/Intervention/image.git
synced 2025-08-18 03:31:19 +02:00
Fix/GitHub workflow (#1423)
Switch back to Ubuntu 22 and pull in imagick via action instead of installing manually.
This commit is contained in:
30
.github/workflows/run-tests.yml
vendored
30
.github/workflows/run-tests.yml
vendored
@@ -4,13 +4,12 @@ on: [ push, pull_request ]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php: [ '8.1', '8.2', '8.3', '8.4' ]
|
php: [ '8.1', '8.2', '8.3', '8.4' ]
|
||||||
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
|
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
|
||||||
imagick: [ '3.7.0' ]
|
|
||||||
stability: [ prefer-stable ]
|
stability: [ prefer-stable ]
|
||||||
|
|
||||||
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ImageMagick ${{ matrix.imagemagick }}
|
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ImageMagick ${{ matrix.imagemagick }}
|
||||||
@@ -19,13 +18,6 @@ jobs:
|
|||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php }}
|
|
||||||
extensions: mbstring, gd
|
|
||||||
coverage: none
|
|
||||||
|
|
||||||
- name: Prepare environment for Imagemagick
|
- name: Prepare environment for Imagemagick
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
|
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
|
||||||
@@ -60,20 +52,12 @@ jobs:
|
|||||||
sudo make install
|
sudo make install
|
||||||
)
|
)
|
||||||
|
|
||||||
- name: Install PHP ImageMagick extension
|
- name: Setup PHP
|
||||||
run: |
|
uses: shivammathur/setup-php@v2
|
||||||
curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz
|
with:
|
||||||
(
|
php-version: ${{ matrix.php }}
|
||||||
cd /tmp || exit 1
|
extensions: mbstring, gd, imagick
|
||||||
tar -xzf imagick.tgz
|
coverage: none
|
||||||
cd imagick-${{ matrix.imagick }}
|
|
||||||
phpize
|
|
||||||
sudo ./configure --with-imagick=/home/runner/im/imagemagick-${{ matrix.imagemagick }}
|
|
||||||
sudo make -j$(nproc)
|
|
||||||
sudo make install
|
|
||||||
)
|
|
||||||
sudo bash -c 'echo "extension=imagick.so" >> /etc/php/${{ matrix.php }}/cli/php.ini'
|
|
||||||
php --ri imagick;
|
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
|
@@ -112,7 +112,10 @@ abstract class BaseTestCase extends MockeryTestCase
|
|||||||
fclose($pointer);
|
fclose($pointer);
|
||||||
|
|
||||||
$allowed = is_string($allowed) ? [$allowed] : $allowed;
|
$allowed = is_string($allowed) ? [$allowed] : $allowed;
|
||||||
$this->assertTrue(in_array($detected, $allowed));
|
$this->assertTrue(
|
||||||
|
in_array($detected, $allowed),
|
||||||
|
'Detected media type "' . $detected . '" is not: ' . join(', ', $allowed),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function assertMediaTypeBitmap(string|EncodedImage $input): void
|
protected function assertMediaTypeBitmap(string|EncodedImage $input): void
|
||||||
|
Reference in New Issue
Block a user