build.yml 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Build
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. release:
  7. types: [created]
  8. jobs:
  9. tests:
  10. runs-on: ubuntu-latest
  11. name: Build and test
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. php: [7.2, 7.3, 7.4, 8.0]
  16. composer-flags: [ "" ]
  17. include:
  18. - php: 7.2
  19. composer-flags: "--prefer-lowest"
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Set up PHP
  23. uses: shivammathur/setup-php@v2
  24. with:
  25. php-version: "${{ matrix.php }}"
  26. coverage: none
  27. - name: Install dependencies
  28. run: COMPOSER_ROOT_VERSION=dev-master composer update ${{ matrix.composer-flags }}
  29. id: end-of-setup
  30. - name: Run tests (phpspec)
  31. run: ./vendor/bin/phpspec run --format=dot
  32. if: always() && steps.end-of-setup.outcome == 'success'
  33. - name: Run tests (phpunit)
  34. run: ./vendor/bin/phpunit
  35. if: always() && steps.end-of-setup.outcome == 'success'