From 16bebdcb2dd2cacc304dd46b66dfb97be60599ed Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sat, 14 Mar 2026 11:41:48 +0100 Subject: [PATCH 1/3] add conditional rector steps --- .github/workflows/cs-stan.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/cs-stan.yml b/.github/workflows/cs-stan.yml index 6c1966c..87096c8 100644 --- a/.github/workflows/cs-stan.yml +++ b/.github/workflows/cs-stan.yml @@ -53,3 +53,21 @@ jobs: - name: Run phpcs if: always() run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr + + - name: Setup rector cache + if: ${{ always() && hashFiles('rector.php') }} + uses: actions/cache@v5 + with: + path: ${{ runner.temp }}/rector + key: ${{ runner.os }}-rector-${{ hashFiles('rector.php', 'composer.lock') }} + restore-keys: ${{ runner.os }}-rector- + + - name: Create rector cache dir + if: ${{ always() && hashFiles('rector.php') }} + run: mkdir -p ${{ runner.temp }}/rector + + - name: Run rector + if: ${{ always() && hashFiles('rector.php') }} + env: + RECTOR_CACHE_DIR: ${{ runner.temp }}/rector + run: composer rector-setup && composer rector-check From 2b4f828098f0a334b780cf0bb8f6bc83bda963d8 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 15 Mar 2026 14:30:58 +0100 Subject: [PATCH 2/3] add conditional psalm --- .github/workflows/cs-stan.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cs-stan.yml b/.github/workflows/cs-stan.yml index 87096c8..a435ee3 100644 --- a/.github/workflows/cs-stan.yml +++ b/.github/workflows/cs-stan.yml @@ -10,7 +10,7 @@ on: phive_keys: description: 'GPG key signatures for phive packages. Should be comma separated string "800d,d44d"' required: false - default: 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5,51C67305FFC2E5C0,99BF4D9A33D65E1E' + default: 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5,99BF4D9A33D65E1E,51C67305FFC2E5C0,99BF4D9A33D65E1E' type: string permissions: @@ -50,6 +50,10 @@ jobs: if: ${{ inputs.check_tests }} run: tools/phpstan analyse -c tests/phpstan.neon --error-format=github + - name: Run psalm + if: ${{ always() && hashFiles('psalm.xml') }} + run: tools/psalm --output-format=github + - name: Run phpcs if: always() run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr From 410d698c8336319cc6f175c1ff5d44f3762a1c44 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 15 Mar 2026 14:38:46 +0100 Subject: [PATCH 3/3] adjust CS command to not use hard coded paths --- .github/workflows/cs-stan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cs-stan.yml b/.github/workflows/cs-stan.yml index a435ee3..c421020 100644 --- a/.github/workflows/cs-stan.yml +++ b/.github/workflows/cs-stan.yml @@ -56,7 +56,7 @@ jobs: - name: Run phpcs if: always() - run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr + run: vendor/bin/phpcs --report=checkstyle | cs2pr - name: Setup rector cache if: ${{ always() && hashFiles('rector.php') }}