diff --git a/.github/workflows/formats.yml b/.github/workflows/formats.yml deleted file mode 100644 index bbdd5771..00000000 --- a/.github/workflows/formats.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Formats - -on: ['push', 'pull_request'] - -jobs: - ci: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - php: [7.4] - dependency-version: [prefer-lowest, prefer-stable] - - name: Formats P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, mbstring, zip - tools: prestissimo - coverage: pcov - - - name: Install Composer dependencies - run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist - - - name: Coding Style Checks - run: | - vendor/bin/rector process src --dry-run - vendor/bin/php-cs-fixer fix -v --dry-run - - - name: Type Checks - run: vendor/bin/phpstan analyse --ansi diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 00000000..0f54227d --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,54 @@ +name: Static Analysis + +on: ['push', 'pull_request'] + +jobs: + cs: + runs-on: ubuntu-latest + + name: Code Style + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + tools: composer:v2 + coverage: none + + - name: Install Dependencies + run: composer update --no-interaction --prefer-dist --no-progress + + - name: Run Rector + run: vendor/bin/rector process src --dry-run + + - name: Run PHP-CS-Fixer + run: vendor/bin/php-cs-fixer fix -v --allow-risky=yes --dry-run + + phpstan: + runs-on: ubuntu-latest + strategy: + matrix: + dependency-version: [prefer-lowest, prefer-stable] + + name: PHPStan ${{ matrix.dependency-version }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + tools: composer:v2 + coverage: none + + - name: Install Dependencies + run: composer update --prefer-stable --no-interaction --prefer-dist --no-progress + + - name: Run PHPStan + run: vendor/bin/phpstan analyse --no-progress