Skip to content

Commit deddafa

Browse files
authored
Merge pull request #11 from simon-mundy/qa-tools-migration-php83
Raise minimum PHP to 8.3 and migrate QA tooling to phpdb-qa-tools (Mago, Infection, Codecov)
2 parents 469463b + a9e19cb commit deddafa

49 files changed

Lines changed: 5022 additions & 1928 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
/.gitattributes export-ignore
22
/.github/ export-ignore
33
/.gitignore export-ignore
4-
/phpcs.xml export-ignore
54
/renovate.json export-ignore
6-
/.laminas-ci.json export-ignore
7-
/.laminas-ci/ export-ignore
8-
/.ci/ export-ignore
95
/phpunit.xml.dist export-ignore
106
/test/ export-ignore
11-
/clover.xml export-ignore
7+
/clover.xml export-ignore
8+
/codecov.yml export-ignore
9+
/infection.json5.dist export-ignore
10+
/mago.toml export-ignore
11+
/lint-baseline.toml export-ignore
12+
/analyzer-baseline.toml export-ignore
13+
/compose.yml export-ignore
14+
/docker/ export-ignore
Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
11
name: "Continuous Integration"
22

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

915
jobs:
10-
matrix:
11-
name: Generate job matrix
12-
runs-on: ubuntu-latest
13-
outputs:
14-
matrix: ${{ steps.matrix.outputs.matrix }}
15-
steps:
16-
- name: Gather CI configuration
17-
id: matrix
18-
uses: laminas/laminas-ci-matrix-action@v1
19-
2016
qa:
21-
name: QA Checks
22-
needs: [matrix]
23-
runs-on: ${{ matrix.operatingSystem }}
24-
strategy:
25-
fail-fast: false
26-
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
27-
steps:
28-
- name: ${{ matrix.name }}
29-
uses: laminas/laminas-continuous-integration-action@v1
30-
with:
31-
job: ${{ matrix.job }}
32-
services:
33-
postgres:
34-
image: postgres
35-
env:
36-
POSTGRES_PASSWORD: 'password'
37-
POSTGRES_DB: 'phpdb_test'
38-
options: >-
39-
--health-cmd pg_isready
40-
--health-interval 10s
41-
--health-timeout 5s
42-
--health-retries 3
43-
ports:
44-
- 5432
17+
uses: php-db/phpdb-qa-tools/.github/workflows/continuous-integration.yml@0.1.x
18+
# CODECOV_TOKEN (org-wide) and INFECTION_DASHBOARD_API_KEY (per-repo) both
19+
# come through here, whichever scope actually defines each one.
20+
secrets: inherit
21+
with:
22+
php-versions: '["8.3", "8.4", "8.5"]'
23+
run-integration: true
24+
# Postgres container for the integration suite; the schema itself is
25+
# seeded by the ListenerExtension PHPUnit bootstrap, not this workflow.
26+
db-image: "postgres:17-alpine"
27+
db-port: "5432"
28+
db-env-json: '{"POSTGRES_DB":"phpdb_test","POSTGRES_USER":"postgres","POSTGRES_PASSWORD":"password"}'
29+
db-health-cmd: "pg_isready -U postgres -d phpdb_test"
30+
# The test/mutation-test jobs run directly on the runner VM (no
31+
# container:), so the DB is only reachable via 127.0.0.1 + the mapped
32+
# port, not the container name. phpunit.xml.dist defaults this to
33+
# "postgres" for local Docker Compose dev (container-to-container); this
34+
# overrides it for CI without touching that file.
35+
test-env-json: '{"TESTS_PHPDB_PGSQL_HOSTNAME":"127.0.0.1"}'
36+
enable-codecov: true
37+
enable-infection: true
38+
# Canonical leg for coverage + mutation testing (highest supported PHP).
39+
coverage-php-version: "8.5"

‎.gitignore‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/.phpcs-cache
2-
/.phpstan-cache
3-
/phpstan.neon
41
/.phpunit.cache
52
/.phpunit.result.cache
63
/phpunit.xml
74
/vendor/
85
/xdebug_filter.php
9-
/clover.xml
6+
/clover.xml
7+
/infection.json5
8+
/infection.log
9+
/summary.log

‎.laminas-ci.json‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)