static-analysis.yml 876 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: "Static Analysis"
  2. on:
  3. pull_request:
  4. branches:
  5. - "*.x"
  6. push:
  7. branches:
  8. - "*.x"
  9. jobs:
  10. static-analysis-psalm:
  11. name: "Static Analysis with Psalm"
  12. runs-on: "ubuntu-20.04"
  13. strategy:
  14. matrix:
  15. php-version:
  16. - "7.1"
  17. steps:
  18. - name: "Checkout code"
  19. uses: "actions/checkout@v2"
  20. - name: "Install PHP"
  21. uses: "shivammathur/setup-php@v2"
  22. with:
  23. coverage: "none"
  24. php-version: "${{ matrix.php-version }}"
  25. - name: "Enforce using stable dependencies"
  26. run: "composer config minimum-stability stable"
  27. - name: "Install dependencies with Composer"
  28. uses: "ramsey/composer-install@v1"
  29. - name: "Run a static analysis with vimeo/psalm"
  30. run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)"