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
4 changes: 1 addition & 3 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -31,10 +31,8 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -33,7 +33,6 @@ jobs:
coverage: none
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1, opcache.enable_cli=1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/mutation-tests-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Mutation tests on diff"

on:
pull_request:

jobs:
mutation-tests-diff:
name: "Mutation tests on diff"

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

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.5"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite, sqlite3, fileinfo

- uses: ramsey/composer-install@3.1.1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: "Infection"
run: "vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --with-uncovered --min-msi=90 --min-covered-msi=95"
46 changes: 46 additions & 0 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Mutation tests"

on:
pull_request:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "renovate/*"

jobs:
mutation-tests:
name: "Mutation tests"

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

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.5"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite, sqlite3, fileinfo

- uses: ramsey/composer-install@3.1.1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: "Infection"
run: "vendor/bin/infection --threads=max"
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
4 changes: 1 addition & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -31,10 +31,8 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "PHPUnit tests"

on:
pull_request:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "renovate/*"

jobs:
phpunit:
name: "PHPUnit tests"

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

strategy:
matrix:
dependencies:
- "lowest"
- "highest"
php-version:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"
- "windows-latest"
include:
- dependencies: "locked"
php-version: "8.5"
operating-system: "ubuntu-latest"
- dependencies: "locked"
php-version: "8.5"
operating-system: "windows-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite, sqlite3, fileinfo

- uses: ramsey/composer-install@3.1.1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: "Tests"
run: "vendor/bin/phpunit --coverage-clover=clover.xml --coverage-text"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ phpunit.xml
.phpcs-cache
phpstan.neon
docs_php
infection.html
infection.log
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ phpstan-baseline: vendor
phpunit: vendor ## run phpunit tests
XDEBUG_MODE=coverage vendor/bin/phpunit

.PHONY: infection
infection: vendor ## run infection
php -d memory_limit=312M vendor/bin/infection --threads=5

.PHONY: infection-diff
infection-diff: vendor ## run infection on differences
php -d memory_limit=312M vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/HEAD --ignore-msi-with-no-mutations --only-covered --min-msi=80 --min-covered-msi=95

.PHONY: static
static: psalm phpstan phpcs-check ## run static analyser

Expand Down
19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"illuminate/contracts": "^10.0 || ^11.0 || ^12.0",
"patchlevel/event-sourcing": "^3.5"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"infection/infection": "^0.31.0",
"infection/infection": "^0.31.9",
"larastan/larastan": "v3.8.0",
"laravel/framework": "^10.0 || ^11.0 || ^12.0",
"league/commonmark": "^2.4",
"orchestra/testbench": "^10.6",
"patchlevel/coding-standard": "^1.3.0",
"phpstan/phpstan": "^2.1.16",
"phpunit/phpunit": "^12.1.5",
"phpstan/phpstan": "^2.1.32",
"phpunit/phpunit": "^11.5.45",
"roave/security-advisories": "dev-master",
"symfony/var-dumper": "^6.4.0 || ^7.0.0",
"wnx/commonmark-markdown-renderer": "^1.4"
},
"config": {
Expand Down Expand Up @@ -64,5 +63,13 @@
"Patchlevel\\LaravelEventSourcing\\EventSourcingServiceProvider"
]
}
},
"scripts": {
"post-autoload-dump": [
"@clear",
"@prepare"
],
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi"
}
}
}
Loading
Loading