on: push
name: Qa workflow
jobs:
  composer:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: composer
      uses: docker://composer
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: install --no-interaction --prefer-dist --optimize-autoloader
    - name: Code style check
      uses: docker://phpdoc/phpcs-ga:master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: -d memory_limit=1024M -s
    - name: composer-require-checker
      uses: docker://phpga/composer-require-checker-ga
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: check --config-file ./composer-require-config.json composer.json
    - name: Psalm
      uses: docker://mickaelandrieu/psalm-ga
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: PHPStan
      uses: docker://oskarstark/phpstan-ga
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: analyse src tests --level max --configuration phpstan.neon
