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
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/phpcs.xml export-ignore
/renovate.json export-ignore
/.laminas-ci.json export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
/clover.xml export-ignore
61 changes: 25 additions & 36 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
name: "Continuous Integration"

# Branch protection blocks direct pushes to release branches, and pull_request
# already re-triggers on every commit pushed to a PR branch (synchronize), so
# there's no push:branches trigger here — only PRs (targeting numbered
# release branches) and pushed version tags.
on:
pull_request:
push:
branches:
- "[0-9]+.[0-9]+.x"
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: 'phpdb_test'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 3306
uses: php-db/phpdb-qa-tools/.github/workflows/continuous-integration.yml@0.1.x
# CODECOV_TOKEN (org-wide) and INFECTION_DASHBOARD_API_KEY (per-repo) both
# come through here, whichever scope actually defines each one.
secrets: inherit
with:
php-versions: '["8.3", "8.4", "8.5"]'
run-integration: true
# Seeded MySQL container for integration tests; DB seeding itself is
# handled by the ListenerExtension PHPUnit bootstrap, not this workflow.
db-image: "mysql:8.0"
db-port: "3306"
db-env-json: '{"MYSQL_ROOT_HOST":"%","MYSQL_DATABASE":"phpdb_test","MYSQL_ALLOW_EMPTY_PASSWORD":"true"}'
db-health-cmd: "mysqladmin ping -h127.0.0.1 --silent"
enable-codecov: true
enable-infection: true
# Canonical leg for coverage + mutation testing (highest supported PHP).
coverage-php-version: "8.5"

8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/.phpcs-cache
/.phpstan-cache
/phpstan.neon
/.phpunit.cache
/.phpunit.result.cache
/phpunit.xml
/vendor/
/xdebug_filter.php
/clover.xml
/clover.xml
/infection.json5
/infection.log
/summary.log
12 changes: 0 additions & 12 deletions .laminas-ci.json

This file was deleted.

20 changes: 20 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
coverage:
status:
project:
default:
target: auto
threshold: 0%
base: auto
patch:
default:
target: auto
threshold: 0%
base: auto

comment:
layout: "diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: true
hide_project_coverage: false
29 changes: 16 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"config": {
"sort-packages": true,
"platform": {
"php": "8.2.99"
"php": "8.3.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"infection/extension-installer": true
}
},
"extra": {
Expand All @@ -32,15 +32,14 @@
}
},
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"php-db/phpdb": "^0.6.0"
},
"require-dev": {
"ext-mysqli": "*",
"ext-pdo_mysql": "*",
"laminas/laminas-coding-standard": "^3.0.1",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"infection/infection": "^0.34.1",
"php-db/phpdb-qa-tools": "0.1.x-dev",
"phpunit/phpunit": "^11.5.42"
},
"suggest": {
Expand All @@ -62,18 +61,22 @@
"scripts": {
"check": [
"@cs-check",
"@sa",
"@static-analysis",
"@test",
"@test-integration"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"cs-check": [
"mago format --check",
"mago lint"
],
"cs-fix": [
"mago format",
"mago lint --fix"
],
"test": "phpunit --colors=always --testsuite \"unit test\"",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"test-integration": "phpunit --colors=always --testsuite \"integration test\"",
"sa": "vendor/bin/phpstan analyse --memory-limit=256M",
"sa-gen-baseline": "vendor/bin/phpstan analyse --memory-limit=256M --generate-baseline",
"sa-verbose": "vendor/bin/phpstan analyse --memory-limit=256M -vv",
"upload-coverage": "coveralls -v"
"static-analysis": "mago analyze",
"mutation-test": "infection"
}
}
Loading