Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.1.x' into 7.0.x-merge-up-into-…
Browse files Browse the repository at this point in the history
…7.1.x_RgT4Fg7p
  • Loading branch information
lcobucci committed Apr 3, 2023
2 parents 2307bda + 0fde70e commit 2361afd
Show file tree
Hide file tree
Showing 33 changed files with 1,532 additions and 1,415 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: "weekly"
day: "friday"
versioning-strategy: increase
open-pull-requests-limit: 20
allow:
- dependency-type: all
labels: ["Dependencies"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 20
labels: ["Dependencies"]
20 changes: 11 additions & 9 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,32 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v2.3.4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
uses: "shivammathur/setup-php@2.15.0"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v2.1.6"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Lint composer.json"

on:
pull_request:
push:

jobs:
coding-standards:
name: "Lint composer.json"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "highest"
php-version:
- "8.0"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, composer-normalize, composer-require-checker, composer-unused

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/[email protected]"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress"

- name: "Validate composer.json"
run: "composer validate --strict"

- name: "Normalize composer.json"
run: "composer-normalize --dry-run"

# Disabling it for now (doesn't run on PHP 8)
#
#- name: "Check composer.json explicit dependencies"
# run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"

- name: "Check composer.json unused dependencies"
run: "composer-unused"
28 changes: 28 additions & 0 deletions .github/workflows/merge-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Merge me!

on:
check_suite:
types:
- completed

jobs:
merge-me:
name: Merge me!
runs-on: ubuntu-latest
steps:
- name: Merge me!
uses: ridedott/[email protected]
with:
# Depending on branch protection rules, a manually populated
# `GITHUB_TOKEN_WORKAROUND` environment variable with permissions to
# push to a protected branch must be used. This variable can have an
# arbitrary name, as an example, this repository uses
# `GITHUB_TOKEN_DOTTBOTT`.
#
# When using a custom token, it is recommended to leave the following
# comment for other developers to be aware of the reasoning behind it:
#
# This must be used as GitHub Actions token does not support
# pushing to protected branches.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: MERGE
24 changes: 13 additions & 11 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,32 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v2.3.4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
uses: "shivammathur/setup-php@2.15.0"
with:
coverage: "xdebug"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v2.1.6"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand All @@ -53,7 +55,7 @@ jobs:
run: "composer install --no-interaction --no-progress"

- name: "Infection"
run: "make infection PHPUNIT_FLAGS=--coverage-clover=coverage.xml"
run: "make infection PHPUNIT_FLAGS=--coverage-clover=coverage.xml INFECTION_FLAGS=--logger-github"

- name: "Upload Code Coverage"
uses: "codecov/codecov-action@v1"
uses: "codecov/codecov-action@v2.1.0"
43 changes: 24 additions & 19 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,32 @@ jobs:
- "locked"
- "development"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v2.3.4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
uses: "shivammathur/setup-php@2.15.0"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v2.1.6"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand All @@ -62,7 +65,7 @@ jobs:
run: "make phpunit"

phpunit-rc:
name: "PHPUnit tests on PHP 8"
name: "PHPUnit tests on php-dev"

runs-on: ${{ matrix.operating-system }}

Expand All @@ -71,30 +74,32 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.0"
- "8.1"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v2.3.4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
uses: "shivammathur/setup-php@2.15.0"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v2.1.6"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/[email protected]"

- name: "Release"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:release"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/[email protected]"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"SHELL_VERBOSITY": "3"
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
Loading

0 comments on commit 2361afd

Please sign in to comment.