2
0

build.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: build
  2. on: [ push, pull_request ]
  3. jobs:
  4. run:
  5. runs-on: ${{ matrix.operating-system }}
  6. strategy:
  7. matrix:
  8. operating-system: [ubuntu-latest]
  9. php-versions: ['7.2', '7.3', '7.4', '8.0']
  10. name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v1
  14. - name: Setup PHP
  15. uses: shivammathur/setup-php@v2
  16. with:
  17. php-version: ${{ matrix.php-versions }}
  18. extensions: mbstring, intl, zip
  19. coverage: none
  20. - name: Check PHP Version
  21. run: php -v
  22. - name: Check Composer Version
  23. run: composer -V
  24. - name: Check PHP Extensions
  25. run: php -m
  26. - name: Validate composer.json and composer.lock
  27. run: composer validate
  28. - name: Install dependencies for PHP 7
  29. if: matrix.php-versions < '8.0'
  30. run: composer update --prefer-dist --no-progress
  31. - name: Install dependencies for PHP 8
  32. if: matrix.php-versions >= '8.0'
  33. run: composer update --prefer-dist --no-progress --ignore-platform-req=php
  34. - name: Run test suite
  35. run: composer check
  36. env:
  37. PHP_CS_FIXER_IGNORE_ENV: 1