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
17 changes: 10 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/.* export-ignore
/tests export-ignore
/*.xml export-ignore
/*.yml export-ignore
/*.yaml export-ignore
/*.lock export-ignore
/*.dist export-ignore
/.* export-ignore
/tests export-ignore
/*.xml export-ignore
/*.yml export-ignore
/*.yaml export-ignore
/*.lock export-ignore
/*.dist export-ignore
/*.json export-ignore
/CLAUDE.md export-ignore
/composer.json -export-ignore
52 changes: 52 additions & 0 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 🧬 Mutation Tests

on: # yamllint disable-line rule:truthy
push:
paths:
- 'src/**'
- 'tests/**'
- 'infection.json'
- 'testo.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/infection.yml'
pull_request:
paths:
- 'src/**'
- 'tests/**'
- 'infection.json'
- 'testo.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/infection.yml'

jobs:
infection:
name: Infection Β· PHP ${{ matrix.php }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.4']
dependencies: [highest]

steps:
- name: πŸ“¦ Check out the codebase
uses: actions/checkout@v5

- name: πŸ› οΈ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
coverage: xdebug

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}

- name: 🧬 Run Infection
run: composer infect:ci
2 changes: 1 addition & 1 deletion .github/workflows/refactoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
coverage: none

- name: πŸ€– Validate composer.json and composer.lock
run: composer validate --ansi --strict
run: composer validate --ansi

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
coverage: none

- name: πŸ€– Validate composer.json and composer.lock
run: composer validate --ansi --strict
run: composer validate --ansi

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: πŸ€– Validate composer.json and composer.lock
run: composer validate --ansi --strict
run: composer validate --ansi

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
Expand Down
61 changes: 54 additions & 7 deletions .github/workflows/testing-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,65 @@
---

on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- master
- main
- '*.*'
- '*.*.*'
pull_request: null

name: MSSQL
name: πŸ›’οΈ MySQL

jobs:
phpunit:
uses: cycle/gh-actions/.github/workflows/db-mssql.yml@master
with:
php: '["8.1","8.2","8.3","8.4"]'
acceptance:
name: MySQL Β· PHP ${{ matrix.php-version }}
timeout-minutes: 8
runs-on: ubuntu-latest
concurrency:
cancel-in-progress: true
group: mysql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
steps:
- name: πŸ“¦ Check out the codebase
uses: actions/checkout@v5

- name: πŸ› οΈ Start MySQL
run: docker compose -f tests/docker-compose.yml up -d cycle-mysql

- name: πŸ› οΈ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite, pdo_mysql
ini-values: error_reporting=E_ALL

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: ⏳ Wait for MySQL
run: |
for i in $(seq 1 30); do
if docker exec $(docker ps -qf "ancestor=mysql:8.0.37") mysqladmin ping -h 127.0.0.1 --silent; then
echo "MySQL is up"; exit 0
fi
echo "Waiting for MySQL... ($i)"; sleep 2
done
echo "MySQL did not become ready in time"; exit 1

...
- name: πŸ§ͺ Run acceptance tests (MySQL)
env:
DB_HOSTNAME: 127.0.0.1
DB_PORT: 13306
DB_USER: root
DB_PASSWORD: 'YourStrong!Passw0rd'
DB_DATABASE: spiral
run: composer test:mysql
61 changes: 54 additions & 7 deletions .github/workflows/testing-pgsql.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,65 @@
---

on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- master
- main
- '*.*'
- '*.*.*'
pull_request: null

name: Postgres
name: 🐘 Postgres

jobs:
phpunit:
uses: cycle/gh-actions/.github/workflows/db-pgsql.yml@master
with:
php: '["8.1","8.2","8.3","8.4"]'
acceptance:
name: Postgres Β· PHP ${{ matrix.php-version }}
timeout-minutes: 8
runs-on: ubuntu-latest
concurrency:
cancel-in-progress: true
group: pgsql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
steps:
- name: πŸ“¦ Check out the codebase
uses: actions/checkout@v5

- name: πŸ› οΈ Start PostgreSQL
run: docker compose -f tests/docker-compose.yml up -d cycle-postgres

- name: πŸ› οΈ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql
ini-values: error_reporting=E_ALL

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: ⏳ Wait for PostgreSQL
run: |
for i in $(seq 1 30); do
if docker exec $(docker ps -qf "ancestor=postgres:15.2") pg_isready -U postgres; then
echo "PostgreSQL is up"; exit 0
fi
echo "Waiting for PostgreSQL... ($i)"; sleep 2
done
echo "PostgreSQL did not become ready in time"; exit 1

...
- name: πŸ§ͺ Run acceptance tests (PostgreSQL)
env:
DB_HOSTNAME: 127.0.0.1
DB_PORT: 15432
DB_USER: postgres
DB_PASSWORD: 'YourStrong!Passw0rd'
DB_DATABASE: spiral
run: composer test:pgsql
72 changes: 65 additions & 7 deletions .github/workflows/testing-sqlserver.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,76 @@
---

on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- master
- main
- '*.*'
- '*.*.*'
pull_request: null

name: MSSQL
name: πŸ“€ SQLServer

jobs:
phpunit:
uses: cycle/gh-actions/.github/workflows/db-mssql.yml@master
with:
php: '["8.1","8.2","8.3","8.4"]'
acceptance:
name: SQLServer Β· PHP ${{ matrix.php-version }}
timeout-minutes: 10
runs-on: ubuntu-latest
concurrency:
cancel-in-progress: true
group: mssql-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
steps:
- name: πŸ“¦ Check out the codebase
uses: actions/checkout@v5

- name: πŸ› οΈ Install ODBC driver
run: |
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list \
| sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18

- name: πŸ› οΈ Start SQLServer
run: docker compose -f tests/docker-compose.yml up -d cycle-sqlserver

- name: πŸ› οΈ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: pecl
extensions: mbstring, pdo, pdo_sqlite, sqlsrv, pdo_sqlsrv
ini-values: error_reporting=E_ALL

- name: πŸ“₯ Install dependencies with composer
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: ⏳ Wait for SQLServer
run: |
container=$(docker ps -qf "ancestor=mcr.microsoft.com/mssql/server:2019-latest")
for i in $(seq 1 30); do
# The image ships sqlcmd under mssql-tools18 (v18 encrypts by default, so it needs -C);
# fall back to the legacy mssql-tools path for older images.
if docker exec "$container" bash -c \
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'SELECT 1' -b \
|| /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1' -b"; then
echo "SQLServer is up"; exit 0
fi
echo "Waiting for SQLServer... ($i)"; sleep 3
done
echo "SQLServer did not become ready in time"; exit 1

...
- name: πŸ§ͺ Run acceptance tests (SQLServer)
env:
DB_HOSTNAME: 127.0.0.1
DB_PORT: 11433
DB_PASSWORD: 'YourStrong!Passw0rd'
run: composer test:sqlserver
Loading
Loading