support newer 8.3+, minor fixes #10
Workflow file for this run
This file contains hidden or 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: | |
| pull_request: | |
| paths: | |
| - .github/workflows/phpunit.yml | |
| - "src/**" | |
| - "tests/**" | |
| - composer.json | |
| - phpunit.xml.dist | |
| push: | |
| paths: | |
| - .github/workflows/phpunit.yml | |
| - "src/**" | |
| - "tests/**" | |
| - composer.json | |
| - phpunit.xml.dist | |
| env: | |
| ALL_DRIVERS: "gd gmagick imagick" | |
| IMAGINE_TEST_WEBSERVERURL: http://localhost:8013 | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Ubuntu) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - "8.3" | |
| - "8.4" | |
| extensions: | |
| - gd,imagick | |
| - gd,gmagick | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: exif,${{ matrix.extensions }} | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Inspect environment | |
| id: inspect | |
| run: | | |
| EXCLUDED_GROUPS=always-skipped | |
| for DRIVER in $ALL_DRIVERS; do | |
| echo "### CHECKING $DRIVER" | |
| if ! php --ri $DRIVER; then | |
| EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$DRIVER" | |
| fi | |
| echo '' | |
| done | |
| echo "excluded-groups=$EXCLUDED_GROUPS" >> $GITHUB_OUTPUT | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install composer dependencies | |
| run: composer update --ansi --no-interaction | |
| - name: Start test web server | |
| uses: Eun/http-server-action@v1 | |
| with: | |
| directory: ${{ github.workspace }}/tests | |
| port: 8013 | |
| - name: PHPUnit | |
| run: composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}" --stop-on-error --stop-on-failure | |
| - name: Save tests temporary files | |
| if: always() && env.IMAGINE_TEST_KEEP_TEMPFILES == 'yes' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ubuntu-${{ matrix.php-version }}-${{ matrix.extensions }} | |
| path: tests/tmp/ | |
| retention-days: 1 |