From 75fe263b6dcb7f790335ebdd9dcd54fa7bb78c5b Mon Sep 17 00:00:00 2001 From: Karoly Gossler Date: Thu, 22 Feb 2024 16:45:21 +0100 Subject: [PATCH] added workflow config --- .github/workflows/static-analysis.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/static-analysis.yml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 00000000..c68fffb3 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,43 @@ +name: Static Analysis + +on: + pull_request: + branches: + - master + paths: + - .github/workflows/static-analysis.yml + - composer.* + - lib/** + - phpstan* + + push: + branches: + - master + paths: + - .github/workflows/static-analysis.yml + - composer.* + - lib/** + - phpstan* + +jobs: + static-analysis-phpstan: + name: Static Analysis with PHPStan + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + coverage: none + php-version: 8.3 + tools: cs2pr + + - name: Install dependencies with Composer + uses: ramsey/composer-install@v2 + + - name: Run static analysis with phpstan/phpstan + run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr +