buildcheck.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: buildcheck
  2. on:
  3. push:
  4. pull_request:
  5. schedule:
  6. - cron: 0 10 1 * *
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. fail-fast: false
  12. matrix:
  13. php:
  14. - "7.3"
  15. - "7.4"
  16. - "8.0"
  17. - "8.1"
  18. - "8.2"
  19. - "8.3"
  20. - "8.4"
  21. composer:
  22. - ""
  23. - "--prefer-lowest"
  24. steps:
  25. - uses: actions/checkout@v1
  26. - name: Create Docker Container
  27. run: |
  28. docker build . -t ci-image --build-arg PHP_VERSION=${{ matrix.php }}
  29. docker run --interactive --detach --volume ${{ github.workspace }}:/app --name ci ci-image
  30. - name: Install Dependencies
  31. run: docker exec ci composer update --no-interaction --no-ansi --prefer-dist ${{ matrix.composer }}
  32. - name: PHPUnit
  33. run: docker exec ci vendor/bin/phpunit
  34. - name: Coding Standards
  35. run: docker exec ci vendor/bin/phpcs
  36. - name: Composer Validate
  37. run: docker exec ci composer validate --strict
  38. windows:
  39. runs-on: windows-latest
  40. env:
  41. ACTIONS_ALLOW_UNSECURE_COMMANDS: true
  42. steps:
  43. - uses: actions/checkout@v4
  44. - uses: nanasess/setup-php@v4
  45. - run: composer update
  46. - run: vendor/bin/phpunit