This commit is contained in:
Daniel Thorn 2019-12-05 10:18:31 -08:00
Родитель 45f54296de
Коммит 09329dfcdc
2 изменённых файлов: 1 добавлений и 24 удалений

Просмотреть файл

@ -105,7 +105,6 @@ jobs:
test:
executor: sbt_executor
parallelism: 8 # See https://circleci.com/docs/2.0/parallelism-faster-jobs/
steps:
- checkout
- early_return_for_skip_tests
@ -113,9 +112,7 @@ jobs:
- run:
name: Scalatest
command: |
TEST_PATTERNS=$(bash .circleci/test-patterns.sh)
echo "Test patterns: $TEST_PATTERNS"
sbt coverage "testOnly $TEST_PATTERNS" coverageReport
sbt coverage test coverageReport
- run:
name: Submit code coverage data
command: |

Просмотреть файл

@ -1,20 +0,0 @@
#!/bin/bash
# Find all test files and output a list of patterns to stdout like:
# *AddonViewsTest
# *ScalarsTest
# etc.
# Change PWD to the root of the git repo.
cd $(git rev-parse --show-toplevel)
# Find the names of all classes extending FlatSpec and collect them into a file of patterns;
# we make liberal use of ' *' as a way of expressing "at least one space"
TEST_FILES=$(find src/test/ -name "*.scala")
sed -n 's/class *\(.*\) *extends *FlatSpec.*/*\1/p' $TEST_FILES | sort | uniq > test_patterns.txt
# Use the circleci cli to choose a subset of test patterns to return;
# the output here will be different for each of the parallel jobs
# (based on CIRCLE_NODE_INDEX and CIRCLE_NODE_TOTAL vars);
# the output is piped through a few utilities to normalize whitespace.
circleci tests split test_patterns.txt | tr -d '\r' | grep . | paste -s -d' ' -