You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

3 years ago
  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 ]
  13. dependency-version: [ prefer-lowest, prefer-stable ]
  14. os: [ ubuntu-latest, windows-latest ]
  15. allow_failures:
  16. - php: 8.0
  17. name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
  18. steps:
  19. - name: Checkout code
  20. uses: actions/checkout@v2
  21. - name: Set up PHP
  22. uses: shivammathur/setup-php@v2
  23. with:
  24. php-version: ${{ matrix.php }}
  25. coverage: none
  26. tools: composer:v2
  27. - name: Install PHP 7 dependencies
  28. run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
  29. if: "matrix.php < 8"
  30. - name: Install PHP 8 dependencies
  31. run: composer update --prefer-stable --ignore-platform-req=php --no-interaction --no-progress
  32. if: "matrix.php >= 8"
  33. - name: Execute tests
  34. run: vendor/bin/phpunit