diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-28 14:10:29 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-28 14:34:26 +0100 |
commit | 456cdbd902a13168d29f8b3c29c7d924cd8d5fdb (patch) | |
tree | d3669062642935ec7f397ef4280144bd6e49d97e /.circleci | |
parent | 7fe92b1f2feb8856dd9369f221dd462e82bf6dcc (diff) |
ci: filter integration and unit tests by module name
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 7085b92..ec8b347 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,23 +53,16 @@ jobs: - run: name: Run coverage for unit tests command: | - # hack - order by size to assign flags (unit tests are smaller) - flags=( unit integration ); - for file in $(ls --sort=size -r ./target/debug/khaleesi-*); do - if [[ -f "$file" && -x "$file" ]]; then - flag=${flags[0]}; - flags=("${flags[@]:1}"); # shift array by 1 - if [[ -z "$flag" ]]; then - echo "Error, no flag left!"; - break; - fi - echo "Running coverage for: $file, flag $flag"; - kcov --verify --include-path $(pwd) --exclude-pattern=tests \ - target/coverage/$(basename $file) \ - $file --quiet - # -c deletes coverage data after submission - bash <(curl -s https://codecov.io/bash) -c -F $flag; - fi + # hack - find biggest binary in dir + testsuite=$(ls --sort=size ./target/debug/khaleesi-* | head -n 1) + flags=( tests integration ); + for flag in ${flags[@]}; do + echo "Running coverage for $flag"; + kcov --verify --include-path $(pwd) --exclude-pattern=tests \ + target/coverage/$flag \ + $testsuite --quiet ::${flag}:: + # -c deletes coverage data after submission + bash <(curl -s https://codecov.io/bash) -c -F $flag; done workflows: version: 2 |