name: CI

on:
    [push, pull_request]

jobs:
    test:
        name: Test on ${{ matrix.php-versions }} PHP
        runs-on: ubuntu-latest

        strategy:
            matrix:
                php-versions: ['7.1', '7.2', '7.3', '7.4']

        steps:
            - uses: actions/checkout@v2

            - name: Setup PHP
              uses: shivammathur/setup-php@v2
              with:
                  php-version: ${{ matrix.php-versions }}
                  coverage: xdebug

            - name: Install Composer Dependencies
              uses: ramsey/composer-install@v1

            - name: Run phpunit
              run: vendor/bin/phpunit --verbose --coverage-text

    roave_bc_check:
        name: Roave BC Check
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2

            - name: Roave BC Check
              uses: docker://nyholm/roave-bc-check-ga

    phpstan:
        runs-on: ubuntu-latest

        steps:
            - uses: actions/checkout@v2

            - uses: shivammathur/setup-php@v2
              with:
                  php-version: 7.1

            - name: Install Composer Dependencies
              uses: ramsey/composer-install@v1

            - name: Run phpstan
              run: vendor/bin/phpstan analyse --no-progress

name: CI

on:
    [push, pull_request]

jobs:
    test:
        name: Test on ${{ matrix.php-versions }} PHP
        runs-on: ubuntu-latest

        strategy:
            matrix:
                php-versions: ['7.1', '7.2', '7.3', '7.4']

        steps:
            - uses: actions/checkout@v2

            - name: Setup PHP
              uses: shivammathur/setup-php@v2
              with:
                  php-version: ${{ matrix.php-versions }}
                  coverage: xdebug

            - name: Install Composer Dependencies
              uses: ramsey/composer-install@v1

            - name: Run phpunit
              run: vendor/bin/phpunit --verbose --coverage-text

    roave_bc_check:
        name: Roave BC Check
        runs-on: ubuntu-latest
        # BC check disabled until 3.0.0 is tagged
        steps:
            - run: echo true
#            - uses: actions/checkout@v2
#
#            - name: Roave BC Check
#              uses: docker://nyholm/roave-bc-check-ga

    phpstan:
        runs-on: ubuntu-latest

        steps:
            - uses: actions/checkout@v2

            - uses: shivammathur/setup-php@v2
              with:
                  php-version: 7.1

            - name: Install Composer Dependencies
              uses: ramsey/composer-install@v1

            - name: Run phpstan
              run: vendor/bin/phpstan analyse --no-progress

Disable roave bc check until 3.0.0 is released
Disable roave bc check until 3.0.0 is released
