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
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ updates:
- 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
interval: "weekly"
cooldown:
default-days: 7
ignore:
- dependency-name: "yiisoft/*"

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

name: Composer require checker

permissions:
contents: read

jobs:
composer-require-checker:
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master
Expand Down
49 changes: 37 additions & 12 deletions .github/workflows/mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ on:
- 'composer.json'
- 'phpunit.xml.dist'
name: mssql

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

permissions:
contents: read
jobs:
tests:
permissions:
contents: read
pull-requests: write
pull-requests: write # Required by Codecov to add pull request coverage comments.
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql.server }}
env:
extensions: pdo, pdo_sqlsrv-5.12
Expand All @@ -35,6 +42,7 @@ jobs:

mssql:
- server: 2022-latest
image: mcr.microsoft.com/mssql/server:2022-latest@sha256:e07b9699a2b749969f19d86563ceeea22bd3a69f7f1db85a8d1ac4bdaf0c6f56
odbc-version: 18
flag: "-C"
tools-path: "/opt/mssql-tools18"
Expand All @@ -43,20 +51,22 @@ jobs:
- php: 8.3
mssql:
server: 2017-latest
image: mcr.microsoft.com/mssql/server:2017-latest@sha256:0773d9c39ee51fdd581ed8119f5a29b3eab875d193b98ffd8f1d56a99de1eac8
odbc-version: 17
flag: ""
tools-path: "/opt/mssql-tools"
os: ubuntu-22.04
- php: 8.3
mssql:
server: 2019-latest
image: mcr.microsoft.com/mssql/server:2019-latest@sha256:5b89fce40832a459ad4d634e9d588ae1e4496e664d9a4a9f8baeed6949b53fef
odbc-version: 18
flag: "-C"
flag: "-C"
tools-path: "/opt/mssql-tools18"

services:
mssql:
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql.server }}
image: ${{ matrix.mssql.image }}
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
Expand All @@ -66,19 +76,24 @@ jobs:
options: --name=mssql --health-cmd="${{ matrix.mssql.tools-path }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Install ODBC driver.
env:
ODBC_VERSION: ${{ matrix.mssql.odbc-version }}
run: |
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-prod.gpg > /dev/null
curl -fsSL https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
. /etc/os-release
echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/ubuntu/${VERSION_ID}/prod ${VERSION_CODENAME} main" | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql${{ matrix.mssql.odbc-version }}
sudo ACCEPT_EULA=Y apt-get install -y "msodbcsql${ODBC_VERSION}"

- name: Verify ODBC driver installation
env:
ODBC_VERSION: ${{ matrix.mssql.odbc-version }}
run: |
echo "=== Installed ODBC Drivers ==="
odbcinst -q -d
echo ""
echo "=== Expected Driver: ODBC Driver ${{ matrix.mssql.odbc-version }} for SQL Server ==="
if odbcinst -q -d -n "ODBC Driver ${{ matrix.mssql.odbc-version }} for SQL Server"; then
echo "=== Expected Driver: ODBC Driver ${ODBC_VERSION} for SQL Server ==="
if odbcinst -q -d -n "ODBC Driver ${ODBC_VERSION} for SQL Server"; then
echo "✓ Correct driver version installed!"
else
echo "✗ Expected driver not found!"
Expand All @@ -89,13 +104,23 @@ jobs:
dpkg -l | grep msodbcsql

- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Create MS SQL Database
run: docker exec -i mssql ${{ matrix.mssql.tools-path }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
env:
MSSQL_SQLCMD_FLAG: ${{ matrix.mssql.flag }}
MSSQL_TOOLS_PATH: ${{ matrix.mssql.tools-path }}
run: |
sqlcmd=("${MSSQL_TOOLS_PATH}/bin/sqlcmd")
if [ -n "$MSSQL_SQLCMD_FLAG" ]; then
sqlcmd+=("$MSSQL_SQLCMD_FLAG")
fi
docker exec -i mssql "${sqlcmd[@]}" -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
Expand All @@ -107,7 +132,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -131,7 +156,7 @@ jobs:
CYCLE_MSSQL_PASSWORD: YourStrong!Passw0rd

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
3 changes: 3 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:

name: mutation test

permissions:
contents: read

jobs:
mutation:
uses: yiisoft/actions/.github/workflows/roave-infection.yml@master
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ on:

name: mysql

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

permissions:
contents: read

jobs:
tests:
name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql }}
name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql.version }}

env:
extensions: pdo, pdo_mysql
Expand All @@ -44,12 +51,14 @@ jobs:
- 8.5

mysql:
- 5.7
- latest
- version: 5.7
image: mysql:5.7@sha256:dab0a802b44617303694fb17d166501de279c3031ddeb28c56ecf7fcab5ef0da
- version: latest
image: mysql:latest@sha256:55e529b57e06b3da98df40600de2245a0ab4bb4b979e3ead4339349b0b50bf4a

services:
mysql:
image: mysql:${{ matrix.mysql }}
image: ${{ matrix.mysql.image }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_PASSWORD: ''
Expand All @@ -60,10 +69,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
Expand All @@ -75,7 +86,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -100,6 +111,6 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
files: ./coverage.xml
39 changes: 27 additions & 12 deletions .github/workflows/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ on:

name: pgsql

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

permissions:
contents: read

jobs:
tests:
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }}
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql.version }}

env:
extensions: pdo, pdo_pgsql
Expand All @@ -44,16 +51,22 @@ jobs:
- 8.5

pgsql:
- 9
- 10
- 11
- 12
- 13
- 14
- version: 9
image: postgres:9@sha256:15055f7b681334cbf0212b58e510148b1b23973639e3904260fb41fa0761a103
- version: 10
image: postgres:10@sha256:7a484b11fcabd39596b1bf08780cdb61fa9b0d8bfad0844dbdce3a6922df95d1
- version: 11
image: postgres:11@sha256:fdfb434d69d7884d6366840279dc3e721d1bd67cc1d02d51aeea7497f323fc5e
- version: 12
image: postgres:12@sha256:4bf4eb8e5932534db5fb9d3d91a212a91406aecf1fa626a60df4a9e2781d73ae
- version: 13
image: postgres:13@sha256:1094e2cdc5605e5c7914633bcd93758a9c52ae8c8b2855ddd1c3a8afbe4795d5
- version: 14
image: postgres:14@sha256:e49f970414656e9198612493a9a63eafffc780789b5ae636f9c077acc0410bd8

services:
postgres:
image: postgres:${{ matrix.pgsql }}
image: ${{ matrix.pgsql.image }}
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
Expand All @@ -64,10 +77,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
Expand All @@ -80,7 +95,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -105,6 +120,6 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
files: ./coverage.xml
5 changes: 1 addition & 4 deletions .github/workflows/rector-cs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Rector + PHP CS Fixer

on:
pull_request_target:
pull_request:
paths:
- 'src/**'
- 'tests/**'
Expand All @@ -20,8 +20,5 @@ concurrency:
jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector-cs.yml@master
secrets:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
php: '8.1'
17 changes: 13 additions & 4 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ on:

name: sqlite

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

permissions:
contents: read

jobs:
phpunit:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand All @@ -41,10 +48,12 @@ jobs:

steps:
- name: Checkout.
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: pcov
extensions: pdo, pdo_sqlite
Expand All @@ -57,7 +66,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer.
uses: actions/cache@v3
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -75,6 +84,6 @@ jobs:

- name: Upload coverage to Codecov.
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
files: ./coverage.xml
3 changes: 3 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:

name: static analysis

permissions:
contents: read

jobs:
psalm:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
Expand Down
Loading
Loading