From 8503d36ebc9713dd9cdd661d3b7f5c87f0e73478 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:09:13 +0000 Subject: [PATCH 1/7] ci: run the Pest tests on SQLite too Run Pest on the runner with a database service instead of Sail, one matrix entry per database: MySQL with and without a prefix, and SQLite. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/run-pest-tests.yml | 158 ++++++++++----------------- 1 file changed, 59 insertions(+), 99 deletions(-) diff --git a/.github/workflows/run-pest-tests.yml b/.github/workflows/run-pest-tests.yml index be9ab2ba..334f11e3 100644 --- a/.github/workflows/run-pest-tests.yml +++ b/.github/workflows/run-pest-tests.yml @@ -21,33 +21,77 @@ env: ,mysqli,mysqlnd,openssl,pcre,PDO,pdo_mysql,pdo_sqlite ,Phar,random,Reflection,session,SimpleXML,SPL,sqlite3,standard ,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib - # Number of days after which the cached Sail image is rebuilt from scratch, - # to pick up updates of its operating system packages, PHP and Node.js. - sail_image_max_age_days: 7 jobs: run-pest-tests: - name: Pest (prefixed=${{ matrix.db-prefix != '' && 'yes' || 'no' }}) + name: Pest (${{ matrix.database }}${{ matrix.database != 'sqlite' && format(', prefixed={0}', matrix.db-prefix != '' && 'yes' || 'no') || '' }}) runs-on: ubuntu-latest - - # The PR previews share one database, prefixing their tables with `p_` (`DB_PREFIX`): the suite also runs with - # the longest prefix, to catch raw SQL missing the prefix and index names longer than the 64 characters of MySQL. + timeout-minutes: 30 + + # The database support is tested here, where the query layer (raw SQL, JSON operators, migrations, prefixes) is + # exercised: the E2E tests only run on MySQL. Each supported database is an entry below; to add one (e.g. + # `mariadb` or `pgsql`), add an entry with its image, port and user, and its PHP extension to `php_extensions`. + # + # MySQL also runs with the longest prefix: the PR previews share one database, prefixing their tables with `p_` + # (`DB_PREFIX`), so this catches raw SQL missing the prefix and index names longer than the 64 characters of MySQL. strategy: fail-fast: false matrix: - db-prefix: ["", "p9999_"] + include: + - database: mysql + db-prefix: "" + coverage: true + # Same version as docker-compose.yml + image: mysql:8.0 + port: 3306 + username: root + - database: mysql + db-prefix: p9999_ + image: mysql:8.0 + port: 3306 + username: root + - database: sqlite + image: "" + + # A service with an empty image is not started: only the runs on a database server have it + services: + database: + image: ${{ matrix.image }} + env: + MYSQL_ROOT_PASSWORD: password + # The parallel processes connect to it to create their own `testing_test_` databases + MYSQL_DATABASE: testing + ports: + - 3306:3306 + options: >- + --health-cmd="mysqladmin ping --silent --host=127.0.0.1 -uroot -ppassword" + --health-interval=5s --health-timeout=5s --health-retries=30 + + # The real environment variables win over `.env` and the `` entries of phpunit.xml + env: + DB_CONNECTION: ${{ matrix.database }} + DB_HOST: 127.0.0.1 + DB_PORT: ${{ matrix.port }} + DB_USERNAME: ${{ matrix.username }} + DB_PASSWORD: password + # Each parallel process of SQLite has its own in-memory database + DB_DATABASE: ${{ matrix.database == 'sqlite' && ':memory:' || 'testing' }} + DB_PREFIX: ${{ matrix.db-prefix }} steps: - name: Checkout code uses: actions/checkout@v7 + with: + persist-credentials: false - # Tests run inside the Sail container (which has its own coverage - # drivers): the runner's PHP only installs the dependencies. - name: Setup PHP and Composer uses: shivammathur/setup-php@v2 with: + # The version of the platform of composer.json, and of the Sail image + php-version: "8.2" extensions: ${{ env.php_extensions }} - coverage: none + coverage: ${{ matrix.coverage && 'pcov' || 'none' }} + ini-values: pcov.directory=. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} fail-fast: true @@ -69,108 +113,24 @@ jobs: run: composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader - name: Prepare Laravel environment - env: - DB_PREFIX: ${{ matrix.db-prefix }} run: | set -e cp .env.example .env - if [[ -n "$DB_PREFIX" ]]; then - sed -i "s/^DB_PREFIX=.*/DB_PREFIX=\"${DB_PREFIX}\"/" .env - fi - # Print environment variables for debugging echo "Environment variables:" sed 's/^/ | /' < .env php artisan key:generate --force - # The assets are built on the runner, where the npm cache is restored by - # `actions/setup-node`, and reach the container through the project - # directory mount. They must be built after the Composer dependencies - # are installed, since the Filament themes import CSS from `vendor`. + # The assets must be built after the Composer dependencies are installed, since the Filament themes import CSS + # from `vendor` - name: Install NodeJS dependencies run: npm ci - name: Build front-end assets run: npm run build - # The cache scope changes every `sail_image_max_age_days` days, so the - # image is periodically rebuilt from scratch. Unused cache entries of the - # previous scopes are deleted by GitHub after 7 days. - - name: Prepare Sail image build - id: sail-image - run: | - # Same group ID Sail would pass to the image build, so the image - # built below matches the one `sail up --build` would produce. - echo "WWWGROUP=$(id -g)" >> "$GITHUB_ENV" - - period_seconds=$(( sail_image_max_age_days * 86400 )) - period_start=$(( $(date -u +%s) / period_seconds * period_seconds )) - echo "cache-scope=sail-$(date -u -d "@${period_start}" +%Y%m%d)" >> "$GITHUB_OUTPUT" - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - # Build the Sail image with Bake, which reads its build definition from - # docker-compose.yml, storing its layers in the GitHub Actions cache: - # subsequent runs reuse them instead of building the image from scratch. - - name: Build Sail image - uses: docker/bake-action@v7 - with: - source: . - files: docker-compose.yml - load: true - set: | - *.cache-from=type=gha,scope=${{ steps.sail-image.outputs.cache-scope }} - *.cache-to=type=gha,scope=${{ steps.sail-image.outputs.cache-scope }},mode=max,ignore-error=true - - # On startup, the application container changes the ID of the `sail` - # user to the runner's user ID, so that it can write to the project - # directory mount: commands run through Sail before that fail with - # "permission denied" errors. - - name: Start application - run: | - ./vendor/bin/sail up -d - - for attempt in $(seq 1 30); do - if [[ "$(./vendor/bin/sail exec -T laravel.test id -u sail 2> /dev/null)" == "$(id -u)" ]]; then - echo "The application container is ready (attempt ${attempt})." - exit 0 - fi - - sleep 1 - done - - echo "::error::The application container was not ready within 30 seconds." - ./vendor/bin/sail logs laravel.test - exit 1 - - # The MySQL container is reported as started (and its socket-based - # healthcheck can already pass) while its init scripts still run on a - # temporary server without networking: wait until it accepts TCP - # connections, like the tests do, to avoid "Connection refused" errors. - - name: Wait for MySQL - run: | - for attempt in $(seq 1 60); do - if ./vendor/bin/sail exec -T mysql sh -c 'mysqladmin ping --silent --host=127.0.0.1 -uroot -p"$MYSQL_ROOT_PASSWORD"' > /dev/null 2>&1; then - echo "MySQL is accepting TCP connections (attempt ${attempt})." - exit 0 - fi - - sleep 2 - done - - echo "::error::MySQL did not accept TCP connections within 120 seconds." - ./vendor/bin/sail logs mysql - exit 1 - - - name: Run tests${{ matrix.db-prefix == '' && ' (with coverage)' || '' }} - run: | - ./vendor/bin/sail test --parallel --drop-databases ${{ matrix.db-prefix == '' && '--coverage' || '' }} - - - name: Stop application - continue-on-error: true - run: | - ./vendor/bin/sail down -v --remove-orphans + - name: Run tests${{ matrix.coverage && ' (with coverage)' || '' }} + run: php artisan test --parallel ${{ matrix.database != 'sqlite' && '--drop-databases' || '' }} ${{ matrix.coverage && '--coverage' || '' }} From f51b2b93a7fc8bbbca4f958640ae3307ac6954d7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:09:13 +0000 Subject: [PATCH 2/7] ci: run the E2E tests on MySQL only The database support is tested by Pest: run the browser tests once on MySQL, and only the setup wizard on each database. Co-Authored-By: Claude Opus 5.5 --- .github/copilot-instructions.md | 5 ++-- .github/workflows/run-e2e-tests.yml | 46 +++++++++++++++++++++-------- README.md | 4 ++- playwright.config.ts | 2 ++ 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4db96db9..e6acda8c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -325,8 +325,9 @@ php artisan tinker The application includes GitHub Actions workflows in `.github/workflows/`: - `deploy-preview.yml` - PR previews, `deploy-nightly.yml` - nightly build of `main`, and `upload-altervista-reusable.yml` - deployments, called by other repositories -- `run-pest-tests.yml` - Pest tests (unit and feature), with coverage -- `run-e2e-tests.yml` - Playwright end-to-end tests (`tests/e2e`), on SQLite and MySQL +- `run-pest-tests.yml` - Pest tests (unit and feature), on MySQL (with and without a table prefix, with coverage) and + SQLite: the database support is tested here +- `run-e2e-tests.yml` - Playwright end-to-end tests (`tests/e2e`), on MySQL; the setup wizard on SQLite and MySQL - `check-translations.yml` - Translation validation - **PR previews** (`deploy-preview.yml`): the `PREVIEW_MODE` repository variable sets which PRs get a preview diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 6322cb6a..7e449969 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -23,24 +23,39 @@ env: jobs: run-e2e-tests: - name: E2E (${{ matrix.database }}) + name: ${{ matrix.suite == 'setup-wizard' && format('E2E setup wizard ({0})', matrix.database) || 'E2E all' }} runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: ${{ matrix.timeout }} - # The application supports these databases: each one runs the whole suite, the setup wizard included (which - # configures the database of its run, see `tests/e2e/setup-wizard.spec.ts`). PostgreSQL is not supported yet. + # The browser tests run once, on MySQL (the database of production and of the PR previews): the database support + # is tested by the Pest tests (`run-pest-tests.yml`), where the query layer is. The setup wizard is the exception: + # it configures the database of its run (see `tests/e2e/setup-wizard.spec.ts`), so it runs on each supported + # database. To add one (e.g. `mariadb` or `pgsql`), add a `setup-wizard` entry with its image, port and user. strategy: fail-fast: false matrix: - database: [sqlite, mysql] include: - - database: sqlite - mysql_image: "" - - database: mysql + # Every project but the setup wizard: keep it in sync with the projects of `playwright.config.ts` + - suite: all + database: mysql + projects: --project=auth-setup --project=chromium --project=mobile --project=global-state + timeout: 45 # Same version as docker-compose.yml mysql_image: mysql:8.0 port: 3306 username: root + - suite: setup-wizard + database: sqlite + projects: --project=setup-wizard + timeout: 15 + mysql_image: "" + - suite: setup-wizard + database: mysql + projects: --project=setup-wizard + timeout: 15 + mysql_image: mysql:8.0 + port: 3306 + username: root # A service with an empty image is not started: only the runs on MySQL have it services: @@ -126,6 +141,8 @@ jobs: run: npx playwright install-deps chromium - name: Run E2E tests + env: + PROJECTS: ${{ matrix.projects }} run: | # Note when the app server stops answering, with its processes and the memory at that moment (printed by # the "Print the state of the test servers" step) @@ -143,7 +160,9 @@ jobs: done ) > "${RUNNER_TEMP}/server-watch.log" 2>&1 & - npx playwright test + # Word splitting is wanted: one argument per project + # shellcheck disable=SC2086 + npx playwright test ${PROJECTS} # Printed at the end of the log (the earlier lines of a long log can be hard to reach): why the test servers may # have stopped, e.g. a crash or the kernel killing them for lack of memory @@ -171,7 +190,7 @@ jobs: if: failure() uses: actions/upload-artifact@v7 with: - name: playwright-report-${{ matrix.database }} + name: playwright-report-${{ matrix.suite }}-${{ matrix.database }} path: | playwright-report/ test-results/ @@ -181,12 +200,13 @@ jobs: - name: Explain how to debug the failed tests if: failure() env: - DATABASE: ${{ matrix.database }} + REPORT: playwright-report-${{ matrix.suite }}-${{ matrix.database }} + RUN: ${{ matrix.suite }}, ${{ matrix.database }} run: | { - echo "### Debugging the failed E2E tests (${DATABASE})" + echo "### Debugging the failed E2E tests (${RUN})" echo - echo "Download the \`playwright-report-${DATABASE}\` artifact of this run, unzip it, then:" + echo "Download the \`${REPORT}\` artifact of this run, unzip it, then:" echo echo "- \`npx playwright show-report playwright-report\`: the report, with the screenshot, the video and the trace of each failed test;" echo "- \`npx playwright show-trace test-results//trace.zip\` (or drop the file on https://trace.playwright.dev) to replay a test step by step, with the page, the network and the console;" diff --git a/README.md b/README.md index 7a79fbbc..65b5c231 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,9 @@ development ones: `app`, installed and seeded with `E2eSeeder` (a user for each They use SQLite by default: set `E2E_DB_CONNECTION` (`mysql`, `mariadb` or `pgsql`) and `E2E_DB_HOST`, `E2E_DB_PORT`, `E2E_DB_USERNAME`, `E2E_DB_PASSWORD` to run them on another database (the databases `e2e_app` and `e2e_setup` are created). Outside of CI, servers already running on the ports are reused: stop them to start from fresh data. The -`E2E tests` workflow (`run-e2e-tests.yml`) runs them on SQLite and MySQL. +`E2E tests` workflow (`run-e2e-tests.yml`) runs them on MySQL, and the setup wizard on SQLite and MySQL: the support of +the databases is tested by the `Pest tests` workflow (`run-pest-tests.yml`), on MySQL (with and without a table prefix) +and SQLite. ### Run workflows locally diff --git a/playwright.config.ts b/playwright.config.ts index bc60e7ae..85095f78 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -36,6 +36,8 @@ export default defineConfig({ video: process.env.CI ? 'on-first-retry' : 'off', screenshot: 'only-on-failure', }, + // The `E2E all` run of `.github/workflows/run-e2e-tests.yml` lists every project but `setup-wizard` (which runs on + // each database): add a new project there too projects: [ { name: 'auth-setup', From a36eb4a7728b74bb8ff6006634a162c516d5e63e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:15:50 +0000 Subject: [PATCH 3/7] ci: run the SQLite Pest tests on a file An in-memory database is lost when db:wipe disconnects from it, and the setup wizard tests need a DB_USERNAME to fall back to. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/run-pest-tests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-pest-tests.yml b/.github/workflows/run-pest-tests.yml index 334f11e3..413c0d60 100644 --- a/.github/workflows/run-pest-tests.yml +++ b/.github/workflows/run-pest-tests.yml @@ -71,11 +71,13 @@ jobs: env: DB_CONNECTION: ${{ matrix.database }} DB_HOST: 127.0.0.1 - DB_PORT: ${{ matrix.port }} - DB_USERNAME: ${{ matrix.username }} + # Not empty on SQLite either: the setup wizard tests fall back to them for the database server fields + DB_PORT: ${{ matrix.port || 3306 }} + DB_USERNAME: ${{ matrix.username || 'root' }} DB_PASSWORD: password - # Each parallel process of SQLite has its own in-memory database - DB_DATABASE: ${{ matrix.database == 'sqlite' && ':memory:' || 'testing' }} + # A file on SQLite, like the installations (each parallel process copies it): an in-memory database is lost when + # `db:wipe` disconnects from it (see `SharedDatabaseSafetyTest`) + DB_DATABASE: ${{ matrix.database == 'sqlite' && format('{0}/database/testing.sqlite', github.workspace) || 'testing' }} DB_PREFIX: ${{ matrix.db-prefix }} steps: @@ -124,6 +126,10 @@ jobs: php artisan key:generate --force + if [[ "$DB_CONNECTION" == "sqlite" ]]; then + touch "$DB_DATABASE" + fi + # The assets must be built after the Composer dependencies are installed, since the Filament themes import CSS # from `vendor` - name: Install NodeJS dependencies From 4d40e674245c8783a7aeb0c5f5d36368e5e72ebe Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:15:50 +0000 Subject: [PATCH 4/7] test: fail the root user setting query on any DB SQLite reads an unknown quoted column as a string, so pointing the settings at another table raised no error there. Co-Authored-By: Claude Opus 5.5 --- tests/Feature/RootUserTransferTest.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/Feature/RootUserTransferTest.php b/tests/Feature/RootUserTransferTest.php index 473394ef..45b4de1d 100644 --- a/tests/Feature/RootUserTransferTest.php +++ b/tests/Feature/RootUserTransferTest.php @@ -169,8 +169,17 @@ }); test('other errors reading the root user setting are raised', function () { - config(['settings.repositories.database.table' => 'users']); app()->forgetScopedInstances(); - expect(fn () => User::rootUserId())->toThrow(QueryException::class); + // The settings table exists, but reading it fails (e.g. a lost connection), the same way on every database + $failed = false; + DB::connection()->beforeExecuting(function (string $query) use (&$failed): void { + if (! $failed && str_contains($query, 'settings')) { + $failed = true; + + throw new QueryException(DB::connection()->getName(), $query, [], new PDOException('Connection lost')); + } + }); + + expect(fn () => User::rootUserId())->toThrow(QueryException::class, 'Connection lost'); }); From fce51d5f176768ee4c1bf25286b995e31fc1743b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:22:10 +0000 Subject: [PATCH 5/7] ci: run the SQLite Pest tests with a prefix too Every database runs with and without the longest table prefix. Co-Authored-By: Claude Opus 5.5 --- .github/copilot-instructions.md | 4 ++-- .github/workflows/run-pest-tests.yml | 24 ++++++++++++------------ README.md | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e6acda8c..b5c16b37 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -325,8 +325,8 @@ php artisan tinker The application includes GitHub Actions workflows in `.github/workflows/`: - `deploy-preview.yml` - PR previews, `deploy-nightly.yml` - nightly build of `main`, and `upload-altervista-reusable.yml` - deployments, called by other repositories -- `run-pest-tests.yml` - Pest tests (unit and feature), on MySQL (with and without a table prefix, with coverage) and - SQLite: the database support is tested here +- `run-pest-tests.yml` - Pest tests (unit and feature), on MySQL (with coverage) and SQLite, each with and without a + table prefix: the database support is tested here - `run-e2e-tests.yml` - Playwright end-to-end tests (`tests/e2e`), on MySQL; the setup wizard on SQLite and MySQL - `check-translations.yml` - Translation validation diff --git a/.github/workflows/run-pest-tests.yml b/.github/workflows/run-pest-tests.yml index 413c0d60..8b96ebb0 100644 --- a/.github/workflows/run-pest-tests.yml +++ b/.github/workflows/run-pest-tests.yml @@ -24,34 +24,34 @@ env: jobs: run-pest-tests: - name: Pest (${{ matrix.database }}${{ matrix.database != 'sqlite' && format(', prefixed={0}', matrix.db-prefix != '' && 'yes' || 'no') || '' }}) + name: Pest (${{ matrix.database }}, prefixed=${{ matrix.db-prefix != '' && 'yes' || 'no' }}) runs-on: ubuntu-latest timeout-minutes: 30 # The database support is tested here, where the query layer (raw SQL, JSON operators, migrations, prefixes) is - # exercised: the E2E tests only run on MySQL. Each supported database is an entry below; to add one (e.g. - # `mariadb` or `pgsql`), add an entry with its image, port and user, and its PHP extension to `php_extensions`. + # exercised: the E2E tests only run on MySQL. To add a database (e.g. `mariadb` or `pgsql`), add it to `database`, + # an `include` entry with its image, port and user, and its PHP extension to `php_extensions`. # - # MySQL also runs with the longest prefix: the PR previews share one database, prefixing their tables with `p_` - # (`DB_PREFIX`), so this catches raw SQL missing the prefix and index names longer than the 64 characters of MySQL. + # Each database also runs with the longest table prefix: the PR previews share one database, prefixing their tables + # with `p_` (`DB_PREFIX`), so this catches raw SQL missing the prefix and, on MySQL, index names longer than its + # 64 characters. strategy: fail-fast: false matrix: + database: [mysql, sqlite] + db-prefix: ["", "p9999_"] include: - database: mysql - db-prefix: "" - coverage: true # Same version as docker-compose.yml image: mysql:8.0 port: 3306 username: root - - database: mysql - db-prefix: p9999_ - image: mysql:8.0 - port: 3306 - username: root - database: sqlite image: "" + # The coverage is measured once + - database: mysql + db-prefix: "" + coverage: true # A service with an empty image is not started: only the runs on a database server have it services: diff --git a/README.md b/README.md index 65b5c231..26feafb2 100644 --- a/README.md +++ b/README.md @@ -152,8 +152,8 @@ They use SQLite by default: set `E2E_DB_CONNECTION` (`mysql`, `mariadb` or `pgsq `E2E_DB_USERNAME`, `E2E_DB_PASSWORD` to run them on another database (the databases `e2e_app` and `e2e_setup` are created). Outside of CI, servers already running on the ports are reused: stop them to start from fresh data. The `E2E tests` workflow (`run-e2e-tests.yml`) runs them on MySQL, and the setup wizard on SQLite and MySQL: the support of -the databases is tested by the `Pest tests` workflow (`run-pest-tests.yml`), on MySQL (with and without a table prefix) -and SQLite. +the databases is tested by the `Pest tests` workflow (`run-pest-tests.yml`), on MySQL and SQLite, each with and +without a table prefix. ### Run workflows locally From 1b37f523fd8d3c2477e0126c8523c16387416e7a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:42:33 +0000 Subject: [PATCH 6/7] docs(changelog): E2E tests run on MySQL Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e6aa34b..a72050e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 unless asked to include them, and the AI assistants ask the user before assigning it again ([#114](https://github.com/OpenCHelper/OpenCongregationHelper/pull/114)). - **End-to-end tests**: browser tests of every feature of the app and of the main workflows (e.g. a zone, then a - territory in it, assigned and returned), run on every pull request on SQLite and MySQL; a failed test keeps a video - and a trace to replay it ([#116](https://github.com/OpenCHelper/OpenCongregationHelper/pull/116)). + territory in it, assigned and returned), run on every pull request on MySQL (the setup wizard on SQLite and MySQL), + while the unit and feature tests run on MySQL and SQLite; a failed test keeps a video and a trace to replay it + ([#116](https://github.com/OpenCHelper/OpenCongregationHelper/pull/116), + [#117](https://github.com/OpenCHelper/OpenCongregationHelper/pull/117)). - The busy timeout and the journal mode of SQLite can be set with `DB_BUSY_TIMEOUT` and `DB_JOURNAL_MODE` ([#116](https://github.com/OpenCHelper/OpenCongregationHelper/pull/116)). From c3123bbfd3312c5472c62eb784422883bbcda97e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:46:22 +0000 Subject: [PATCH 7/7] ci: measure the Pest coverage of app/ only Co-Authored-By: Claude Opus 5.5 --- .github/workflows/run-pest-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-pest-tests.yml b/.github/workflows/run-pest-tests.yml index 8b96ebb0..0bb64dfb 100644 --- a/.github/workflows/run-pest-tests.yml +++ b/.github/workflows/run-pest-tests.yml @@ -75,8 +75,8 @@ jobs: DB_PORT: ${{ matrix.port || 3306 }} DB_USERNAME: ${{ matrix.username || 'root' }} DB_PASSWORD: password - # A file on SQLite, like the installations (each parallel process copies it): an in-memory database is lost when - # `db:wipe` disconnects from it (see `SharedDatabaseSafetyTest`) + # A file on SQLite, like the installations (each parallel process creates its own `_test_`): an in-memory + # database is lost when `db:wipe` disconnects from it (see `SharedDatabaseSafetyTest`) DB_DATABASE: ${{ matrix.database == 'sqlite' && format('{0}/database/testing.sqlite', github.workspace) || 'testing' }} DB_PREFIX: ${{ matrix.db-prefix }} @@ -93,7 +93,8 @@ jobs: php-version: "8.2" extensions: ${{ env.php_extensions }} coverage: ${{ matrix.coverage && 'pcov' || 'none' }} - ini-values: pcov.directory=. + # Only the code measured by phpunit.xml (``), not `vendor/` + ini-values: ${{ matrix.coverage && 'pcov.directory=app' || '' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} fail-fast: true