name: Run CI

on: [push, pull_request]

jobs:
  build:
    name: CI
    runs-on: ubuntu-latest

    strategy:
      matrix:
        php: ['7.1', '7.2', '7.3', '7.4', '8.0']
        dependencies: ['normal', 'authoritative']

    steps:
    - uses: actions/checkout@v2

    - name: Install dependencies
      if: matrix.dependencies == 'normal'
      run: composer install --prefer-dist
      env:
        COMPOSER_ROOT_VERSION: dev-master

    - name: Install dependencies
      if: matrix.dependencies == 'authoritative'
      run: composer install --prefer-dist --classmap-authoritative
      env:
        COMPOSER_ROOT_VERSION: dev-master

    - name: Run Psalm
      if: matrix.php == '8.1'
      run: ./vendor/bin/psalm --threads=2 --output-format=github --shepherd

    - name: Run Phpunit
      run: ./vendor/bin/phpunit

    - name: Run PhpCs
      if: matrix.php == '8.1'
      run: ./vendor/bin/phpcs -q --report=checkstyle | ./vendor/bin/cs2pr

Add github workflow to execute quality tools
Add github workflow to execute quality tools

Signed-off-by: Jefersson Nathan <153c4746339763f957e90675c08ce8587deedfe7@gmail.com>
