diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml_ index 35b3a86..137baf3 100644 --- a/.github/workflows/bc.yml_ +++ b/.github/workflows/bc.yml_ @@ -1,15 +1,22 @@ +name: backwards compatibility + on: - - pull_request - - push + pull_request: + paths: &paths + - 'config/**' + - 'src/**' + - '.github/workflows/bc.yml' + - 'composer.json' + push: + branches: ['master'] + paths: *paths + +permissions: + contents: read -name: backwards compatibility jobs: - roave_bc_check: - name: Roave BC Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - 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/bechmark.yml b/.github/workflows/bechmark.yml index d83037f..884b657 100644 --- a/.github/workflows/bechmark.yml +++ b/.github/workflows/bechmark.yml @@ -1,31 +1,21 @@ +name: bechmark + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' + paths: &paths + - 'config/**' + - 'src/**' - 'tests/**' - + - '.github/workflows/benchmark.yml' + - 'composer.json' + - 'phpbench.json' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - - 'tests/**' - -name: bechmark + paths: *paths permissions: contents: read + jobs: phpbench: name: PHP ${{ matrix.php }} @@ -41,7 +31,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false @@ -55,8 +45,8 @@ jobs: env: GITHUB_EVENT_REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} - - name: "Baseline creation: Checkout default branch." - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + - name: "Baseline creation: Checkout default branch" + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 if: ${{ env.WITH_BENCH_BASELINE == '1' }} with: ref: ${{ github.event.repository.default_branch }} @@ -67,7 +57,7 @@ jobs: working-directory: ./tests run: docker compose build php${{ matrix.php }} - - name: "Baseline creation: Run PhpBench." + - name: "Baseline creation: Run PhpBench" id: baseline if: ${{ env.WITH_BENCH_BASELINE == '1' }} continue-on-error: true @@ -78,8 +68,8 @@ jobs: if: ${{ env.WITH_BENCH_BASELINE == '1' && steps.baseline.outcome == 'failure' }} run: echo "WITH_BENCH_BASELINE=0" >> $GITHUB_ENV - - name: "Pull request: Checkout head." - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + - name: "Pull request: Checkout head" + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 if: ${{ github.event_name == 'pull_request' }} with: ref: ${{ github.event.pull_request.head.sha }} @@ -91,7 +81,7 @@ jobs: working-directory: ./tests run: docker compose build php${{ matrix.php }} - - name: "Run PhpBench." + - name: Run PhpBench working-directory: ./tests run: | if [ "${WITH_BENCH_BASELINE}" == '1' ]; then diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b1d72b..1b0fad4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,29 +1,25 @@ +name: build + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - 'config/**' + - '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' + branches: ['master'] + paths: *paths -name: build +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true permissions: contents: read + jobs: phpunit: name: PHP ${{ matrix.php }} @@ -34,7 +30,7 @@ jobs: php: [ 81, 82, 83, 84 ] steps: - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Build diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 05fafe5..f190e86 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,31 +1,24 @@ +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/**' + - 'config/**' + - '.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 diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 48ef6eb..df0c2b1 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,29 +1,26 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - - 'Makefile' - + paths: &paths + - 'config/**' + - 'src/**' + - 'tests/**' + - '.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' - - 'Makefile' + branches: ['master'] + paths: *paths -name: Mutation test +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true permissions: contents: read + jobs: mutation: name: PHP ${{ matrix.php }}-${{ matrix.os }} @@ -44,24 +41,24 @@ jobs: steps: - name: Checkout. - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Install PHP with extensions. - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: php-version: ${{ matrix.php }} ini-values: memory_limit=-1 coverage: pcov tools: composer:v2 - - name: Install dependencies with composer. - run: composer update --no-interaction --no-progress --optimize-autoloader --ansi + - name: Install Composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run infection run: | - vendor/bin/roave-infection-static-analysis-plugin --threads=2 --ignore-msi-with-no-mutations --only-covered + vendor/bin/roave-infection-static-analysis-plugin --threads=1 --ignore-msi-with-no-mutations --only-covered env: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} RABBITMQ_HOST: 127.0.0.1 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index c0b8262..7cb79ed 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,29 +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/**' + - 'config/**' + - '.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 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: