-
-
Notifications
You must be signed in to change notification settings - Fork 485
Description
Bug description
we have around 500 tests in the project. running the tests on ci is very slow; it takes about 30 minutes to complete on github actions. however, on my local machine (macbook m4 pro), it only takes around 4 minutes.
Steps to reproduce
in every test case, we create new tenants, each tenant creates a new database. we create unique databases for each tenant using uuid(), which means we do not reuse databases among all tests to make tests more practical.
to reproduce this performance issue:
git clone https://github.com/dasundev/tenancy-testing
cd tenancy-testing
cp .env.example .env
composer install
php artisan key:generate
# create a new database called "testing" in your local
./vendor/bin/pest --parallelExpected behavior
Expected behavior
all tests must run fast on CI and local.
Current behavior
on macbook pro m4 pro:
tests: 501 passed (501 assertions)
duration: 277.32s
parallel: 14 processes
ci:
https://github.com/dasundev/tenancy-testing/actions/runs/21037124353/job/60488094594 (if the job is still running, you may check it later)
performance varies with tenant migrations
Laravel version
12.47.0
stancl/tenancy version
3.9.1