Last active
November 15, 2018 16:09
-
-
Save NejcZupec/4c8145359e740035531969485d1f1d65 to your computer and use it in GitHub Desktop.
CircleCI Parallelization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ circleci tests glob "test/integration/**/test_*.py" | |
test/integration/test_1.py | |
test/integration/test_2.py | |
test/integration/test_3.py | |
test/integration/test_4.py | |
test/integration/test_5.py | |
test/integration/test_6.py | |
test/integration/test_7.py | |
test/integration/test_8.py | |
$ circleci tests split --total 4 --index 0 | |
test/integration/test_1.py | |
test/integration/test_5.py | |
$ CIRCLE_NODE_TOTAL=4 | |
$ CIRCLE_NODE_INDEX=0 | |
$ circleci tests split | |
test/integration/test_1.py | |
test/integration/test_5.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
integration-tests: | |
parallelism: 8 | |
docker: | |
- image: circleci/python:3.7-stretch | |
steps: | |
- run: | |
name: Split tests and run them | |
command: | | |
TEST_FILES=$(circleci tests glob "test/integration/**/test_*.py" | circleci tests split) | |
bin/test.py integration "$(echo $TEST_FILES)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment