You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. name: PHP Composer
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. build:
  9. strategy:
  10. matrix:
  11. php-versions: ["7.2", "7.3", "7.4", "8.0"]
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Setup PHP, with composer and extensions
  16. uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
  17. with:
  18. php-version: ${{ matrix.php-versions }}
  19. extensions: mbstring, simplexml, dom, curl
  20. coverage: pcov
  21. - name: Validate composer.json and composer.lock
  22. run: composer validate --strict
  23. - name: Cache Composer packages
  24. id: composer-cache
  25. uses: actions/cache@v2
  26. with:
  27. path: vendor
  28. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  29. restore-keys: |
  30. ${{ runner.os }}-php-
  31. - name: Install dependencies
  32. run: composer update --prefer-dist --no-progress
  33. - name: Run test suite
  34. run: composer run-script test