From 0fb5a9b3e98e19efdee67ae709f1069b1c798705 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Jan 2026 16:05:31 +0100 Subject: [PATCH] Fix CI --- .github/workflows/phan.yml | 12 ++++++++++++ .github/workflows/pre-commit.yml | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phan.yml b/.github/workflows/phan.yml index b392517e12a..55151116659 100644 --- a/.github/workflows/phan.yml +++ b/.github/workflows/phan.yml @@ -34,12 +34,23 @@ jobs: || github.event.schedule == false steps: - uses: actions/checkout@v6 + + # Another method to get the list of changed files + # It sets the variable steps.changed-php.outputs.all_changed_files for other steps + - name: Get all changed php files (if PR) + id: changed-php + if: env.gh_event == 'pull_request' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./.github/scripts/get_changed_php.sh + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: 8.2 coverage: none # disable xdebug, pcov tools: phan + - name: Get changed PHP files id: files run: | @@ -47,6 +58,7 @@ jobs: FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '\.php$' || true) PHP_FILES=$(echo "$FILES" | grep '\.php$' || true) echo "$PHP_FILES" > /tmp/phan-files.txt + - name: Run Phan analysis if: steps.files.outputs.files != '' run: | diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4b0d75cbf22..da9311b9409 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -109,15 +109,15 @@ jobs: tools: phpcs # Install perltidy and perlcritic - - name: Install perltidy and perlcritic - run: sudo apt-get update && sudo apt-get install -y perltidy libperl-critic-perl + #- name: Install perltidy and perlcritic + # run: sudo apt-get update && sudo apt-get install -y perltidy libperl-critic-perl # Run all the precommit tools (defined into pre-commit-config.yaml). # We can force exclusion of some of them here. - name: Run pre-commit hooks env: # SKIP is used by pre-commit to not execute certain hooks - SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer + SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer,shellcheck run: | set -o pipefail pre-commit gc