php.yml 874 B

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