From ace89fad0ce79d1bb646f2e567565ca69fab4bac Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 13 Jul 2026 10:06:42 +0300 Subject: [PATCH 1/3] Cleanup GitHub workflows --- .github/workflows/bc.yml | 30 ++++---------- .github/workflows/build.yml | 39 +++++++----------- .../workflows/composer-require-checker.yml | 38 ++++++------------ .github/workflows/mutation.yml | 33 ++++++--------- .github/workflows/rector-cs.yml | 2 + .github/workflows/static.yml | 40 ++++++++----------- .github/workflows/yiisoft-di.yml | 34 ++++++---------- .github/workflows/yiisoft-factory.yml | 35 ++++++---------- .github/workflows/zizmor.yml | 16 +++----- 9 files changed, 98 insertions(+), 169 deletions(-) diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index 563f85f..2557a8c 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -1,35 +1,21 @@ +name: backwards compatibility + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + paths: &paths + - 'src/**' + - '.github/workflows/bc.yml' + - 'composer.json' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: backwards compatibility + paths: *paths permissions: contents: read + jobs: roave_bc_check: uses: yiisoft/actions/.github/workflows/bc.yml@master with: - os: >- - ['ubuntu-latest'] php: >- ['8.1'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b19e5d..4441a8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,38 +1,29 @@ +name: build + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/build.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - -name: build + branches: ['master'] + paths: *paths permissions: contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: phpunit: uses: yiisoft/actions/.github/workflows/phpunit.yml@master secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - os: >- - ['ubuntu-latest', 'windows-latest'] php: >- ['8.1', '8.2', '8.3', '8.4', '8.5'] - codecovFailCiIfError: false diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 9ef9028..4ad7f7c 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,37 +1,25 @@ +name: Composer require checker + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - '.github/workflows/composer-require-checker.yml' + - 'composer.json' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: Composer require checker + branches: ['master'] + paths: *paths permissions: contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: composer-require-checker: uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master with: - os: >- - ['ubuntu-latest'] php: >- ['8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 6e8be66..ee984df 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,28 +1,22 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - 'tools/infection/**' + - '.github/workflows/mutation.yml' + - 'composer.json' + - 'infection.json.dist' + - 'phpunit.xml.dist' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - -name: mutation test + branches: ['master'] + paths: *paths permissions: contents: read + jobs: mutation: uses: yiisoft/actions/.github/workflows/infection.yml@master @@ -32,6 +26,5 @@ jobs: ['ubuntu-latest'] php: >- ['8.5'] - infection-args: "--ignore-msi-with-no-mutations" secrets: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index d4003af..83e3649 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -19,6 +19,8 @@ concurrency: jobs: rector: + permissions: + contents: write # Required to commit automated Rector and CS fixes uses: yiisoft/actions/.github/workflows/rector-cs.yml@master with: php: '8.1' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4ae842e..322ef8a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,35 +1,27 @@ +name: static analysis + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - + paths: &paths + - 'src/**' + - 'tools/psalm/**' + - '.github/workflows/static.yml' + - 'psalm*.xml' + - 'composer.json' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - -name: static analysis + branches: ['master'] + paths: *paths permissions: contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: psalm: uses: yiisoft/actions/.github/workflows/psalm.yml@master with: - os: >- - ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.github/workflows/yiisoft-di.yml b/.github/workflows/yiisoft-di.yml index c612bd2..bd81574 100644 --- a/.github/workflows/yiisoft-di.yml +++ b/.github/workflows/yiisoft-di.yml @@ -1,34 +1,24 @@ +name: yiisoft-di + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/yiisoft-di.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + branches: ['master'] + paths: *paths -name: yiisoft-di +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: read jobs: phpunit: name: PHP ${{ matrix.php }}-${{ matrix.os }} diff --git a/.github/workflows/yiisoft-factory.yml b/.github/workflows/yiisoft-factory.yml index 157afc1..b4643c5 100644 --- a/.github/workflows/yiisoft-factory.yml +++ b/.github/workflows/yiisoft-factory.yml @@ -1,34 +1,24 @@ +name: yiisoft-factory + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/yiisoft-di.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: - branches: - - master - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + branches: ['master'] + paths: *paths -name: yiisoft-factory +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: read jobs: phpunit: name: PHP ${{ matrix.php }}-${{ matrix.os }} @@ -44,6 +34,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" steps: - name: Checkout Yii Definitions diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 430255d..7534234 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -1,21 +1,17 @@ name: GitHub Actions Security Analysis with zizmor 🌈 on: - push: - branches: - - master - - main - paths: - - '.github/**.yml' - - '.github/**.yaml' pull_request: - paths: + paths: &paths - '.github/**.yml' - '.github/**.yaml' + push: + branches: ['master'] + paths: *paths permissions: - actions: read # Required by zizmor when reading workflow metadata through the API. - contents: read # Required to read workflow files. + actions: read # Required by zizmor when reading workflow metadata through the API + contents: read # Required to read workflow files jobs: zizmor: From 312132040c6562965add79f85d061efbf0167819 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 13 Jul 2026 10:08:36 +0300 Subject: [PATCH 2/3] fix --- .github/workflows/mutation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index ee984df..d3c8a4d 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -26,5 +26,6 @@ jobs: ['ubuntu-latest'] php: >- ['8.5'] + infection-args: "--ignore-msi-with-no-mutations" secrets: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} From a2beda39a7624ec4bcc906bb888cbfc7bb4cd0db Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 13 Jul 2026 10:11:34 +0300 Subject: [PATCH 3/3] fix --- .github/workflows/mutation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index d3c8a4d..99ad4d3 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -21,7 +21,7 @@ jobs: mutation: uses: yiisoft/actions/.github/workflows/infection.yml@master with: - min-covered-msi: 100 + min-covered-msi: 98 os: >- ['ubuntu-latest'] php: >-