Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
open-pull-requests-limit: 0
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
ignore:
- dependency-name: "yiisoft/*"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase-if-necessary
# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase-if-necessary
cooldown:
default-days: 7
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ on:

name: build

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
codeception:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand All @@ -45,18 +52,20 @@ jobs:

steps:
- name: Checkout.
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: false
extensions: fileinfo, intl
ini-values: date.timezone='UTC', register_argc_argv=On
php-version: ${{ matrix.php }}

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1

- name: Run codeception build.
run: vendor/bin/codecept build
Expand All @@ -72,7 +81,7 @@ jobs:

- name: Upload coverage to Codecov.
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: runtime/tests/_output/coverage.xml
15 changes: 12 additions & 3 deletions .github/workflows/composer-dependency-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ on:

name: Composer dependency analyzer

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
analyzer:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand All @@ -40,17 +47,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: none
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1

- name: Run composer dependency analyzer
run: vendor/bin/composer-dependency-analyser --config=composer-dependency-analyser.php
39 changes: 30 additions & 9 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: Code Style

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

on:
pull_request:
paths-ignore:
Expand All @@ -12,32 +19,46 @@ on:

jobs:
cs-fix:
name: PHP CS Fixer and Rector
runs-on: ubuntu-latest
permissions:
contents: write
contents: write # Required to push automated CS fixes to the pull request branch.
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Install PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install Composer dependencies
uses: "ramsey/composer-install@v4"
uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1

- name: Run PHP CS Fixer
run: ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php

- name: Run Rector
run: ./vendor/bin/rector --output-format=github

- name: Configure Git credentials
env:
GH_TOKEN: ${{ github.token }}
run: git config --global credential.helper '!f() { echo username=x-access-token; echo password=$GH_TOKEN; }; f'

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Apply PHP CS Fixer and Rector changes (CI)"
file_pattern: '*.php'
disable_globbing: true
run: |
git add -- '*.php'

if git diff --cached --quiet; then
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Apply PHP CS Fixer and Rector changes (CI)"
git push
19 changes: 15 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ on:

name: static analysis

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
psalm:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand All @@ -37,17 +44,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: none
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # 3.2.1

- name: Static analysis
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --no-cache --php-version=${{ matrix.php }} | cs2pr --graceful-warnings --colorize
env:
PHP_VERSION: ${{ matrix.php }}
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --no-cache --php-version="${PHP_VERSION}" | cs2pr --graceful-warnings --colorize
22 changes: 22 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches:
- master
- main
paths:
- '.github/**.yml'
- '.github/**.yaml'
pull_request:
paths:
- '.github/**.yml'
- '.github/**.yaml'

permissions:
actions: read # Required by zizmor when reading workflow metadata through the API.
contents: read # Required to read workflow files.

jobs:
zizmor:
uses: yiisoft/actions/.github/workflows/zizmor.yml@master
Loading