PHPunits parallel execution inside docker container

Hi All,

I am trying to execute phpunits using parallelism, however there is one change, all the code runs inside a docker container.
So my set up does something like this -

  1. Checkout code
  2. Run docker compose, the local drive gets mounted as a volume. Bring up other containers like mysql, elastic etc.
  3. Execute the tests inside the docker.

Even though I am running the split command all the tests still get executed on all the machines.

TESTS=$(circleci tests glob “/home/circleci/project/tests/ci-phpunit-tests//” | circleci tests split)
echo $TESTS --> This shows the list of tests.

The ci-phpunits-tests follows the conventions listed here []

docker exec --user circleci -it -e CIRCLECI MyAppContainer make test $TESTS

I am using a make file to run the tests, contents of my MakeFile are as below -

find application/language/ -name ‘*.php’ -print0 | xargs -0 -L 1 php -l > /dev/null
cd application/tests && phpunit --coverage-html coverage --coverage-xml coverage --log-junit …/…/test-results/phpunit/results.xml

I am even passing the list of tests to the test task shown above .

is there anything I am missing?