composer-16.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. on:
  2. - pull_request
  3. - push
  4. name: composer-16
  5. jobs:
  6. tests:
  7. name: PHP-${{ matrix.php }}-${{ matrix.os }}
  8. env:
  9. key: cache-v1
  10. runs-on: ${{ matrix.os }}
  11. strategy:
  12. matrix:
  13. os:
  14. - ubuntu-latest
  15. php:
  16. - "5.4"
  17. - "5.5"
  18. - "5.6"
  19. - "7.0"
  20. - "7.1"
  21. - "7.2"
  22. - "7.3"
  23. - "7.4"
  24. - "8.0"
  25. composer:
  26. - "1.6.*"
  27. steps:
  28. - name: Configure git
  29. run: git config --global core.autocrlf false
  30. - name: Checkout
  31. uses: actions/checkout@v2.3.4
  32. - name: Determine composer cache directory
  33. run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
  34. - name: Cache dependencies installed with composer
  35. uses: actions/cache@v2
  36. with:
  37. path: ${{ env.COMPOSER_CACHE_DIR }}
  38. key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
  39. restore-keys: |
  40. php${{ matrix.php }}-composer-
  41. - name: Install composer
  42. run: composer require --dev "composer/composer:${{ matrix.composer }}" --update-with-dependencies
  43. - name: Run tests with phpunit
  44. run: |
  45. vendor/bin/phpunit --verbose --colors=always
  46. cd tests/scripts && sh run.sh