mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 01:00:06 +02:00
Update run-tests.yml some experiments.
This commit is contained in:
62
.github/workflows/run-tests.yml
vendored
62
.github/workflows/run-tests.yml
vendored
@@ -6,9 +6,16 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
php: [ 8.0, 8.1 ]
|
php: [ '8.0', '8.1' ]
|
||||||
|
imagemagick: [
|
||||||
|
'6.9.12-43',
|
||||||
|
'7.1.0-28'
|
||||||
|
]
|
||||||
|
imagick: [
|
||||||
|
'3.7.0'
|
||||||
|
]
|
||||||
stability: [ prefer-lowest, prefer-stable ]
|
stability: [ prefer-lowest, prefer-stable ]
|
||||||
|
|
||||||
name: P${{ matrix.php }} - ${{ matrix.stability }}
|
name: P${{ matrix.php }} - ${{ matrix.stability }}
|
||||||
@@ -21,9 +28,55 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
extensions: mbstring, gd, imagick
|
extensions: mbstring, gd
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
|
- name: Prepare environament for Imagemagick
|
||||||
|
run: |
|
||||||
|
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libjpeg62-dev
|
||||||
|
sudo apt-get install -y libgif-dev
|
||||||
|
sudo apt-get install -y libtiff-dev
|
||||||
|
sudo apt-get install -y libpng-dev
|
||||||
|
sudo apt-get install -y libwebp-dev
|
||||||
|
sudo apt-get install -y libmagickwand-dev
|
||||||
|
|
||||||
|
- name: Cache ImageMagick
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-ImageMagick
|
||||||
|
with:
|
||||||
|
path: ~/im/imagemagick-${{ matrix.imagemagick }}
|
||||||
|
key: ${{ runner.os }}-ImageMagick-${{ matrix.imagemagick }}
|
||||||
|
|
||||||
|
- name: Install ImageMagick
|
||||||
|
run: |
|
||||||
|
curl -o /tmp/ImageMagick.tar.gz -sL https://www.imagemagick.org/download/ImageMagick-${{ matrix.imagemagick }}.tar.gz
|
||||||
|
(
|
||||||
|
cd /tmp || exit 1
|
||||||
|
tar xf ImageMagick.tar.gz
|
||||||
|
cd ImageMagick-${{ matrix.imagemagick }}
|
||||||
|
sudo ./configure --prefix=/opt/imagemagick
|
||||||
|
sudo make -j$(nproc)
|
||||||
|
sudo make install
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Install PHP ImageMagick extension
|
||||||
|
run: |
|
||||||
|
curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz
|
||||||
|
(
|
||||||
|
cd /tmp || exit 1
|
||||||
|
tar -xzf imagick.tgz
|
||||||
|
cd imagick-${{ matrix.imagick }}
|
||||||
|
phpize
|
||||||
|
sudo ./configure --with-imagick=/opt/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
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
@@ -38,5 +91,8 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||||
|
|
||||||
|
- name: Which Imagick Version
|
||||||
|
run: php -r 'var_dump(Imagick::getVersion());'
|
||||||
|
|
||||||
- name: Execute tests
|
- name: Execute tests
|
||||||
run: vendor/bin/phpunit --no-coverage
|
run: vendor/bin/phpunit --no-coverage
|
||||||
|
Reference in New Issue
Block a user