component.yml 933 B

123456789101112131415161718192021222324252627282930313233
  1. name: Component
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. test:
  9. name: PHP ${{ matrix.php-version }}
  10. runs-on: ubuntu-latest
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. php-version: ['7.3', '7.4', '8.0', '8.1']
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Use PHP ${{ matrix.php-version }}
  18. uses: shivammathur/setup-php@v2
  19. with:
  20. php-version: ${{ matrix.php-version }}
  21. extensions: curl
  22. - name: Validate composer.json and composer.lock
  23. run: composer validate --strict
  24. - name: Install dependencies
  25. run: composer update --prefer-stable --prefer-dist --no-progress
  26. - name: Run test suite
  27. run: composer run-script test-ci
  28. - name: Upload Coverage report
  29. run: |
  30. wget https://scrutinizer-ci.com/ocular.phar
  31. php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml