WIP Do Not Install #1126
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: PHPWord | |
on: [push, pull_request] | |
jobs: | |
php-cs-fixer: | |
name: PHP CS Fixer | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv | |
- uses: actions/checkout@v2 | |
- name: Validate composer config | |
run: composer validate --strict | |
- name: Composer Install | |
run: composer global require friendsofphp/php-cs-fixer | |
- name: Add environment path | |
run: export PATH="$PATH:$HOME/.composer/vendor/bin" | |
- name: Run PHPCSFixer | |
run: php-cs-fixer fix --dry-run --diff | |
phpmd: | |
name: PHP Mess Detector | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
extensions: gd, xml, zip | |
- uses: actions/checkout@v2 | |
- name: Composer Install | |
run: composer install --ansi --prefer-dist --no-interaction --no-progress | |
- name: Run phpmd | |
run: ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude "src/PhpWord/Shared/PCLZip/*" | |
phpstan: | |
name: PHP Static Analysis | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Disabled PHPStan in '7.1' | |
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
#php: ['8.4'] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: gd, xml, zip | |
- uses: actions/checkout@v2 | |
- name: Composer Install | |
run: composer install --ansi --prefer-dist --no-interaction --no-progress | |
- name: Run phpstan Php7 | |
if: matrix.php == '7.2' || matrix.php == '7.3' | |
run: ./vendor/bin/phpstan analyse -c phpstan.neon.php73.dist | |
- name: Run phpstan Php7.4 | |
if: matrix.php == '7.4' | |
run: ./vendor/bin/phpstan analyse -c phpstan.neon.php7.dist | |
- name: Run phpstan Php8 | |
if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2' || matrix.php == '8.3' || matrix.php == '8.4' | |
run: ./vendor/bin/phpstan analyse -c phpstan.neon.dist | |
phpunit: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
experimental: | |
- false | |
php: | |
- '7.1' | |
- '7.2' | |
- '7.3' | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
include: | |
- php: 'nightly' | |
experimental: true | |
name: PHPUnit ${{ matrix.php }} | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, gd, mbstring, xml, zip | |
coverage: ${{ (matrix.php == '8.3') && 'xdebug' || 'none' }} | |
- uses: actions/checkout@v2 | |
- name: Composer Config nightly | |
if: matrix.php == 'nightly' | |
run: composer config platform.php 8.5.99 | |
- name: Composer Install | |
run: composer install --ansi --prefer-dist --no-interaction --no-progress | |
- name: Run phpunit 7.1 7.2 | |
if: matrix.php == '7.1' || matrix.php == '7.2' | |
run: ./vendor/bin/phpunit -c phpunit.7.8.xml.dist --no-coverage | |
- name: Run phpunit 7.3 7.4 8.0 | |
if: matrix.php == '7.3' || matrix.php == '7.4' || matrix.php == '8.0' | |
run: ./vendor/bin/phpunit -c phpunit9.xml.dist --no-coverage | |
- name: Run phpunit 8.1 8.2 8.4 | |
if: matrix.php == '8.1' || matrix.php == '8.2' || matrix.php == '8.4' | |
run: ./vendor/bin/phpunit -c phpunit10.xml.dist --no-coverage | |
- name: Run phpunit nightly experimental | |
if: matrix.php == 'nightly' | |
env: | |
FAILURE_ACTION: "${{ matrix.experimental == true }}" | |
run: ./vendor/bin/phpunit -c phpunit10.xml.dist --no-coverage || $FAILURE_ACTION | |
- name: Test non-Composer Autoloader | |
env: | |
FAILURE_ACTION: "${{ matrix.experimental == true }}" | |
run: php samples/Sample_45_Autoloader.php | |
- name: Run phpunit 8.3 | |
if: matrix.php == '8.3' | |
run: ./vendor/bin/phpunit -c phpunit10.xml.dist --coverage-clover build/clover.xml | |
- name: Upload coverage results to Coveralls | |
if: matrix.php == '8.3' | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/clover.xml | |
format: clover | |
fail-on-error: false |