php.yml 812 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: PHP Composer
  2. on:
  3. push:
  4. branches: [ 3.0 ]
  5. pull_request:
  6. branches: [ 3.0 ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Validate composer.json and composer.lock
  13. run: composer validate --strict
  14. - name: Cache Composer packages
  15. id: composer-cache
  16. uses: actions/cache@v2
  17. with:
  18. path: vendor
  19. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  20. restore-keys: |
  21. ${{ runner.os }}-php-
  22. - name: Install dependencies
  23. run: composer install --prefer-dist --no-progress
  24. # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
  25. # Docs: https://getcomposer.org/doc/articles/scripts.md
  26. - name: Run test suite
  27. run: composer test