I am running pytests and trying to split them into different containers using parallelization. However, the tests don’t appear to be split as expected. I have tests that cannot be run on the same docker instance, so am splitting by name, but the failures persist even though I would expect the tests to be split across containers. Also checking the artifacts, each parallel run lists every test, further making me believe they are not being split.
Here is my config:
jobs: unit-tests: executor: py3_10 parallelism: 2 steps: - checkout - python/install-packages: app-dir: ~/project/app pkg-manager: poetry - run: command: | set -e TESTFILES=$(circleci tests glob "tests/**/test*.py" | circleci tests split) mkdir -p test-results cd app && poetry run pytest --verbose --junitxml=../test-results/junit.xml $TESTFILES - store_test_results: path: test-results - store_artifacts: path: test-results
Another notable thing is that all parallel runs result in a failure, even though only one file has failures in it. Am I missing some config on how to properly split my files into parallel nodes?