Last active
November 3, 2021 21:33
-
-
Save mmeyer2k/c6718384212abe490c53fa757b73f031 to your computer and use it in GitHub Desktop.
circle.ci parallelism for phpunit
This file contains hidden or 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
#!/bin/sh | |
# circle.ci parallelism appends the subset of files to run in the container | |
# to the end of the test command. phpunit does not automatically parse files | |
# appended to the argument like this: | |
# | |
# phpunit --some-args 'testSomething1.php' 'testSomething2.php' | |
# | |
# this script parses arguments and individually dispatches calls to phpunit | |
# | |
# * you may need to modify the path to phpunit | |
for var in "$@" | |
do | |
./vendor/phpunit/phpunit/phpunit "$var" | |
done |
@mmeyer2k
Hi, same question as the previous. Do you have a config.yml demo using this script?
me also...
@t202wes @spaceo sorry i didn't notice your comments
@andrewmclagan Here is a basic example of usage. Further documentation is here:
https://circleci.com/docs/2.0/parallelism-faster-jobs/
steps:
- run:
name: Run tests
command: |
TEST_FILES=$(circleci tests glob "tests/**/*.php" | circleci tests split --split-by=timings)
sh /path/to/this/file.sh $TEST_FILES
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mmeyer2k
How are you implementing this in your
config.yml