run-tests.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Run tests
  2. on:
  3. push:
  4. pull_request:
  5. schedule:
  6. - cron: '0 0 * * *'
  7. jobs:
  8. php-tests:
  9. runs-on: ${{ matrix.os }}
  10. strategy:
  11. matrix:
  12. php: [8.0, 7.4, 7.3, 7.2, 7.1]
  13. dependency-version:
  14. # - prefer-lowest
  15. - prefer-stable
  16. os: [ubuntu-latest]
  17. name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
  18. steps:
  19. - name: Checkout code
  20. uses: actions/checkout@v1
  21. - name: Setup PHP
  22. uses: shivammathur/setup-php@v2
  23. with:
  24. php-version: ${{ matrix.php }}
  25. extensions: fileinfo, dom, curl, libxml, mbstring, bcmath, soap
  26. coverage: none
  27. tools: composer:v2
  28. - name: Install PHP 7 dependencies
  29. run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
  30. if: "matrix.php < 8"
  31. - name: Install PHP 8 dependencies
  32. run: composer update --${{ matrix.dependency-version }} --ignore-platform-req=php --no-interaction --no-progress
  33. if: "matrix.php >= 8"
  34. - name: Execute tests
  35. run: vendor/bin/phpunit