From 220e9b2eb4c5fc54e5319818e8caf0f77d2afd58 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 11 Feb 2024 08:39:28 +0100 Subject: [PATCH] Enhance CI --- .composer-require-checker.config.json | 1 + .github/workflows/ci-linux.yml | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.composer-require-checker.config.json b/.composer-require-checker.config.json index aa3fe6d..4ccbe7f 100644 --- a/.composer-require-checker.config.json +++ b/.composer-require-checker.config.json @@ -32,6 +32,7 @@ "GALETTE_IMPORTS_PATH", "GALETTE_LOGS_PATH", "GALETTE_MODE", + "GALETTE_DEBUG", "GALETTE_NIGHTLY", "GALETTE_PHOTOS_PATH", "GALETTE_PLUGINS_PATH", diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index f8e457b..edacaa8 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -11,8 +11,9 @@ on: pull_request: jobs: - ubuntu-latest: + lint: runs-on: ubuntu-latest + name: "Lint on PHP ${{ matrix.php-versions }}" strategy: matrix: @@ -20,8 +21,6 @@ jobs: coverage: [none] fail-fast: false - name: PHP ${{ matrix.php-versions }} on ubuntu-latest - steps: - name: PHP uses: shivammathur/setup-php@v2 @@ -31,7 +30,7 @@ jobs: coverage: ${{ matrix.coverage }} - name: Checkout Galette core - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: galette/galette path: galette-core @@ -39,7 +38,7 @@ jobs: ref: develop - name: Checkout plugin - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: galette-core/galette/plugins/plugin-objectslend @@ -49,7 +48,7 @@ jobs: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} @@ -65,17 +64,22 @@ jobs: cd galette-core/galette/plugins/plugin-objectslend ../../vendor/bin/phpcs lib/ ./*.php + - name: Twig CS + run: | + cd galette-core/galette/plugins/plugin-objectslend + ../../vendor/bin/twigcs templates/default --severity error --display blocking + - name: Check missing symbols run: | cd galette-core/galette/plugins/plugin-objectslend composer require maglnet/composer-require-checker -W vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json ../../composer.json + if: matrix.php-versions == '8.3' - name: PHPStan checks run: | cd galette-core/galette/plugins/plugin-objectslend ../../vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress - if: matrix.php-versions == '8.1' - name: Headers checks run: |