From d130a1aea015a783c4e9ad16321a4b8ca7f4b509 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 16 Jul 2020 18:22:17 +0100 Subject: [PATCH 1/2] Cleanup actions static analysis --- .github/workflows/formats.yml | 46 ----------------------------- .github/workflows/static.yml | 54 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/formats.yml create mode 100644 .github/workflows/static.yml 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..6bb1e639 --- /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 From 5fb81e9eb4149e9d2253c2913b6dd4ae6741d5ff Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 16 Jul 2020 18:36:58 +0100 Subject: [PATCH 2/2] Update static.yml --- .github/workflows/static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 6bb1e639..0f54227d 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -51,4 +51,4 @@ jobs: run: composer update --prefer-stable --no-interaction --prefer-dist --no-progress - name: Run PHPStan - run: vendor/bin/phpstan analyse + run: vendor/bin/phpstan analyse --no-progress