From dac431611726fb1c9c79dbcb4ac7fdda99ec4165 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Apr 2024 10:35:11 +0200 Subject: [PATCH 1/2] php: Remove phpstan and upgrade actions/checkout --- .github/workflows/php.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 469ff423..8cb2039c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,12 +17,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] os: ['ubuntu-latest'] steps: - name: Checkout code base - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -31,11 +31,7 @@ jobs: tools: phpcs - name: Setup dependencies - run: | - composer require -n --no-progress overtrue/phplint phpstan/phpstan - sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2 - sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git /usr/share/icinga-php/ipl - sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git /usr/share/icinga-php/vendor + run: composer require -n --no-progress overtrue/phplint - name: PHP Lint if: ${{ ! cancelled() }} @@ -45,10 +41,6 @@ jobs: if: ${{ ! cancelled() }} run: phpcs -wps --colors - - name: PHPStan - if: ${{ ! cancelled() }} - run: ./vendor/bin/phpstan analyse - test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -59,12 +51,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] os: ['ubuntu-latest'] steps: - name: Checkout code base - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 From 0128d2a59ff416a1cf0df50f1b2232d058058f35 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Apr 2024 10:35:35 +0200 Subject: [PATCH 2/2] phpstan: Add separate workflow --- .github/workflows/phpstan.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 00000000..72f916de --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,15 @@ +name: PHPStan + +on: + pull_request: + branches: + - main + +jobs: + phpstan: + uses: icinga/github-actions/.github/workflows/phpstan.yml@main + with: + dependencies: | + { + "/icingaweb2": "https://github.com/Icinga/icingaweb2.git" + }