tests.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: tests
  2. on: [push,pull_request]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-latest
  6. services:
  7. memcached:
  8. image: memcached:1.6-alpine
  9. ports:
  10. - 11211:11211
  11. redis:
  12. image: redis:5.0
  13. ports:
  14. - 6379:6379
  15. options: --entrypoint redis-server
  16. strategy:
  17. fail-fast: true
  18. matrix:
  19. php: ['7.1', '7.2', '7.3', '7.4']
  20. # #php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
  21. # PHP8.x
  22. # Problem 1
  23. # - Root composer.json requires phpunit/phpcov ^5 -> satisfiable by phpunit/phpcov[5.0.0].
  24. # - phpunit/phpcov 5.0.0 requires php ^7.1 -> your php version (8.2.19) does not satisfy that requirement.
  25. # Problem 2
  26. # - phpunit/phpunit[7.5.2, ..., 7.5.20] require php ^7.1 -> your php version (8.2.19) does not satisfy that requirement.
  27. # - Root composer.json requires phpunit/phpunit ^7.5.2 -> satisfiable by phpunit/phpunit[7.5.2, ..., 7.5.20].
  28. #
  29. stability: [prefer-lowest, prefer-stable]
  30. name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
  31. steps:
  32. - name: Checkout code
  33. uses: actions/checkout@v2
  34. - name: Setup PHP
  35. uses: shivammathur/setup-php@v2
  36. with:
  37. php-version: ${{ matrix.php }}
  38. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, memcache, http, apcu
  39. tools: composer:v2
  40. coverage: none
  41. - name: Set Minimum Guzzle Version
  42. uses: nick-invision/retry@v1
  43. with:
  44. timeout_minutes: 8
  45. max_attempts: 8
  46. command: composer require guzzlehttp/guzzle:^7.2 --no-interaction --no-update
  47. if: matrix.php >= 8
  48. - name: Install dependencies
  49. uses: nick-invision/retry@v1
  50. with:
  51. timeout_minutes: 8
  52. max_attempts: 8
  53. command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
  54. - name: Execute tests
  55. run: vendor/bin/phpunit #--verbose
  56. # env:
  57. # - name: Mount Directories and run Docker-Machine
  58. # run: docker run -dtP --name unittest -v /home/runner/work/koseven/koseven:/tmp/koseven/ koseven/docker:travis-devel
  59. #
  60. # - name: Install composer dependencies
  61. # run: docker exec unittest /bin/sh -c "service redis-server start; cd /tmp/koseven; composer install"
  62. #
  63. # - name: Run Koseven Unittest(s)
  64. # run: docker exec unittest /bin/sh -c "cd /tmp/koseven; php vendor/bin/phpunit"