test.yml 681 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Test
  2. on:
  3. pull_request:
  4. paths:
  5. - src/**
  6. - tests/**
  7. - 'phpunit.xml*'
  8. - 'composer.*'
  9. workflow_dispatch:
  10. jobs:
  11. integration:
  12. runs-on: ubuntu-latest
  13. strategy:
  14. matrix:
  15. php-version: ['5.6', '7.4', '8.0', '8.1']
  16. steps:
  17. - uses: actions/checkout@v3
  18. - uses: shivammathur/setup-php@v2
  19. with:
  20. tools: composer
  21. php-version: ${{ matrix.php-version }}
  22. - name: 'Validate composer.json'
  23. run: composer validate --strict
  24. - name: 'Validate PHP syntax'
  25. run: php -l src/db.php
  26. - run: composer install
  27. - name: Run tests
  28. run: composer test