From f48c052a8651f10151a225063635ed326d599d99 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 31 Jul 2026 15:30:27 +0300 Subject: [PATCH] Cleanup GitHub workflows --- .github/workflows/bc.yml | 27 +++++++++++++++ .github/workflows/bc.yml_ | 33 ------------------- .../workflows/composer-require-checker.yml | 33 +++++++------------ .github/workflows/mssql.yml | 17 ++++------ .github/workflows/mutation.yml | 31 ++++++++--------- .github/workflows/mysql.yml | 32 +++++++----------- .github/workflows/pgsql.yml | 32 +++++++----------- .github/workflows/rector-cs.yml | 2 ++ .github/workflows/sqlite.yml | 33 +++++++------------ .github/workflows/static.yml | 31 +++++++---------- .github/workflows/zizmor.yml | 20 +++++------ 11 files changed, 118 insertions(+), 173 deletions(-) create mode 100644 .github/workflows/bc.yml delete mode 100644 .github/workflows/bc.yml_ diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml new file mode 100644 index 0000000..e429e08 --- /dev/null +++ b/.github/workflows/bc.yml @@ -0,0 +1,27 @@ +name: backwards compatibility + +on: + pull_request: + paths: &paths + - 'src/**' + - 'composer.json' + - '.github/workflows/bc.yml' + push: + branches: ['master'] + paths: *paths + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + roave_bc_check: + uses: yiisoft/actions/.github/workflows/bc.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.5'] diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml_ deleted file mode 100644 index 0ea4a5c..0000000 --- a/.github/workflows/bc.yml_ +++ /dev/null @@ -1,33 +0,0 @@ -on: - pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - push: - branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: backwards compatibility - -jobs: - roave_bc_check: - uses: yiisoft/actions/.github/workflows/bc.yml@master - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.4'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 1a56fef..99be65f 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,32 +1,23 @@ +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/**' + - 'tests/**' + - 'composer.json' + - '.github/workflows/composer-require-checker.yml' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: Composer require checker + 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 diff --git a/.github/workflows/mssql.yml b/.github/workflows/mssql.yml index 72bcd5b..bd8bd7f 100644 --- a/.github/workflows/mssql.yml +++ b/.github/workflows/mssql.yml @@ -1,6 +1,8 @@ +name: mssql + on: pull_request: - paths: + paths: &paths - 'src/**' - 'tests/**' - '.github/workflows/mssql.yml' @@ -8,20 +10,15 @@ on: - 'phpunit.xml.dist' push: branches: ['master'] - paths: - - 'src/**' - - 'tests/**' - - '.github/workflows/mssql.yml' - - 'composer.json' - - 'phpunit.xml.dist' -name: mssql + paths: *paths + +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: read jobs: tests: permissions: diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 3ca737c..7b6e08d 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,28 +1,25 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - 'phpunit.xml.dist' + - 'infection.json.dist' + - 'composer.json' + - '.github/workflows/mutation.yml' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - -name: mutation test + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: mutation: uses: yiisoft/actions/.github/workflows/roave-infection.yml@master diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 225405d..69f3d3f 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -1,34 +1,24 @@ +name: mysql + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/mysql.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + paths: *paths -name: mysql +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: read - jobs: tests: name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql.version }} diff --git a/.github/workflows/pgsql.yml b/.github/workflows/pgsql.yml index 450d385..86c7487 100644 --- a/.github/workflows/pgsql.yml +++ b/.github/workflows/pgsql.yml @@ -1,34 +1,24 @@ +name: pgsql + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/pgsql.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + paths: *paths -name: pgsql +permissions: + contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: read - jobs: tests: name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql.version }} diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index d4003af..a4947b6 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 formatting fixes back to the PR uses: yiisoft/actions/.github/workflows/rector-cs.yml@master with: php: '8.1' diff --git a/.github/workflows/sqlite.yml b/.github/workflows/sqlite.yml index f4ca0b4..03b7bc1 100644 --- a/.github/workflows/sqlite.yml +++ b/.github/workflows/sqlite.yml @@ -1,33 +1,24 @@ +name: sqlite + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/sqlite.yml' + - 'composer.json' + - 'phpunit.xml.dist' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + branches: ['master'] + paths: *paths -name: sqlite +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/static.yml b/.github/workflows/static.yml index 528e0cd..2967135 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,30 +1,23 @@ +name: static analysis + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - + paths: &paths + - 'src/**' + - 'psalm.xml' + - 'composer.json' + - '.github/workflows/static.yml' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - -name: static analysis + 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 diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 430255d..6ff2a77 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -1,21 +1,21 @@ 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 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: zizmor: