Revert "ci: run tests in parallel with Testcontainers MySQL"

Paratest's per-process DB suffix (testing_test_N) conflicts with the
Testcontainers user permissions (only 'testing' DB granted). Restore
the mysql service + sequential pest run. Parallel + per-process DBs
needs a separate change: either widen container grants or override
Laravel ParallelTesting::setUpProcess to no-op.
This commit is contained in:
Víctor Falcón 2026-04-30 16:35:00 +02:00
parent c06688b9e9
commit 82e9a771ef
1 changed files with 17 additions and 2 deletions

View File

@ -70,6 +70,15 @@ jobs:
tests:
runs-on: ubuntu-latest
needs: build-assets
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v4
@ -108,9 +117,15 @@ jobs:
run: php artisan key:generate
- name: Tests
run: ./vendor/bin/pest --exclude-testsuite=Browser,Performance --parallel --processes=4
run: ./vendor/bin/pest --exclude-testsuite=Browser,Performance
env:
TESTCONTAINERS: true
TESTCONTAINERS: false
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
browser-tests:
if: github.event_name == 'pull_request'