Upgrade Library to work with latest PHP Versions #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHPUnit | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*.*.*" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
Build: | |
runs-on: 'ubuntu-latest' | |
container: 'byjg/php:${{ matrix.php-version }}-cli' | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
- "8.1" | |
- "8.0" | |
- "7.4" | |
steps: | |
- name: Install dependencies for test | |
run: | | |
VERSION=${{ matrix.php-version }} | |
case $VERSION in | |
"8.1") | |
apk add --no-cache php82-pecl-imagick | |
"8.1") | |
apk add --no-cache php81-pecl-imagick | |
;; | |
"8.0") | |
apk add --no-cache php8-pecl-imagick --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ | |
;; | |
"7.4") | |
apk add --no-cache php7-pecl-imagick | |
;; | |
esac | |
- uses: actions/checkout@v4 | |
- run: composer install | |
- run: ./vendor/bin/phpunit | |
Documentation: | |
if: github.ref == 'refs/heads/master' | |
needs: Build | |
uses: byjg/byjg.github.io/.github/workflows/add-doc.yaml@master | |
with: | |
folder: php | |
project: ${{ github.event.repository.name }} | |
secrets: inherit | |