From c35b2f9ae5314d4b171977e25759809a1657bd89 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 31 Jul 2026 21:57:08 +0300 Subject: [PATCH] Cleanup GitHub workflows --- .github/workflows/bc.yml_ | 34 +++++++++++------ .github/workflows/build.yml | 37 ++++++++----------- .../workflows/composer-require-checker.yml | 37 ++++++++----------- .github/workflows/mutation.yml_ | 36 +++++++++--------- .github/workflows/static.yml | 35 ++++++++---------- .github/workflows/zizmor.yml | 20 +++++----- 6 files changed, 97 insertions(+), 102 deletions(-) diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml_ index f96bf4f..269ea32 100644 --- a/.github/workflows/bc.yml_ +++ b/.github/workflows/bc.yml_ @@ -1,15 +1,25 @@ +name: backwards compatibility + on: - - pull_request - - push + pull_request: + paths: &paths + - 'src/**' + - '.github/workflows/bc.yml' + - 'composer.json' + push: + branches: ['master'] + paths: *paths + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true -name: backwards compatibility jobs: - roave_bc_check: - name: Roave BC Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@ab62d6b3b0e0cff6c9724ec5a395bedb41c639a2 - - name: fetch tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + roave_bc_check: + uses: yiisoft/actions/.github/workflows/bc.yml@master + with: + php: >- + ['8.1'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbc42c5..542964f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,35 +1,30 @@ +name: build + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'phpunit.xml.dist' + - '.github/workflows/build.yml' 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: - codecovToken: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: extensions: fileinfo, pdo, pdo_sqlite, sqlite3 os: >- diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 16a5576..6b605a1 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,32 +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 + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'composer-require-checker.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 + 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 diff --git a/.github/workflows/mutation.yml_ b/.github/workflows/mutation.yml_ index 0c30aa2..8a70009 100644 --- a/.github/workflows/mutation.yml_ +++ b/.github/workflows/mutation.yml_ @@ -1,27 +1,29 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - + paths: &paths + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'infection.json.dist' + - 'phpunit.xml.dist' + - '.github/workflows/mutation.yml_' push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' + branches: ['master'] + paths: *paths -name: mutation test +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: mutation: - uses: yiisoft/actions/.github/workflows/roave-infection.yml@ab62d6b3b0e0cff6c9724ec5a395bedb41c639a2 + uses: yiisoft/actions/.github/workflows/roave-infection.yml@master with: os: >- ['ubuntu-latest'] diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index b4b83b4..b48c553 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,30 +1,25 @@ +name: static analysis + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - + paths: &paths + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'psalm.xml' + - '.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 + 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 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: