tests.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # This is a basic workflow to help you get started with Actions
  2. name: Tests
  3. # Controls when the action will run.
  4. on:
  5. push:
  6. pull_request:
  7. # Allows you to run this workflow manually from the Actions tab
  8. workflow_dispatch:
  9. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  10. jobs:
  11. # This workflow contains a single job called "build"
  12. run_tests:
  13. # The type of runner that the job will run on
  14. runs-on: ubuntu-latest
  15. strategy:
  16. fail-fast: true
  17. matrix:
  18. php: [7.2, 7.3, 7.4, 8.0, 8.1]
  19. name: PHP ${{ matrix.php }}
  20. # Steps represent a sequence of tasks that will be executed as part of the job
  21. steps:
  22. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  23. - uses: actions/checkout@v2
  24. - name: Checkout code
  25. uses: actions/checkout@v2
  26. - name: Setup PHP
  27. uses: shivammathur/setup-php@v2
  28. with:
  29. php-version: ${{ matrix.php }}
  30. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
  31. tools: composer:v2
  32. coverage: none
  33. - name: Install dependencies
  34. uses: nick-invision/retry@v1
  35. with:
  36. timeout_minutes: 5
  37. max_attempts: 5
  38. command: composer update --prefer-dist --no-interaction --no-progress
  39. - name: Execute tests
  40. run: vendor/bin/phpunit --verbose