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.

static-code-analysis.yml 1.3KB

1234567891011121314151617181920212223242526272829
  1. name: Static code analysis
  2. on: [pull_request]
  3. jobs:
  4. static-code-analysis:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - name: Checkout submodules
  9. shell: bash
  10. run: |
  11. auth_header="$(git config --local --get http.https://github.com/.extraheader)"
  12. git submodule sync --recursive
  13. git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
  14. - name: Set up php7.4
  15. uses: shivammathur/setup-php@master
  16. with:
  17. php-version: 7.4
  18. coverage: none
  19. - name: Composer install
  20. run: composer i
  21. - name: Psalm
  22. run: composer run psalm -- --monochrome --no-progress --output-format=text --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )
  23. - name: Check diff
  24. run: git diff -- . ':!lib/composer'
  25. - name: Show potential changes in Psalm baseline
  26. run: |
  27. bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"