mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Split up unit tests on Shippable. (#21931)
* Add more verbose output to coverage combine. * Run unit tests on CI separately by version.
This commit is contained in:
parent
0d455037a2
commit
2804d2e848
4 changed files with 26 additions and 10 deletions
|
@ -9,7 +9,11 @@ matrix:
|
|||
- env: TEST=none
|
||||
include:
|
||||
- env: TEST=other
|
||||
- env: TEST=units
|
||||
|
||||
- env: TEST=units/2.6
|
||||
- env: TEST=units/2.7
|
||||
- env: TEST=units/3.5
|
||||
- env: TEST=units/3.6
|
||||
|
||||
- env: TEST=osx/10.11
|
||||
|
||||
|
|
|
@ -41,7 +41,12 @@ def command_coverage_combine(args):
|
|||
ansible_path = os.path.abspath('lib/ansible/') + '/'
|
||||
root_path = os.getcwd() + '/'
|
||||
|
||||
counter = 0
|
||||
|
||||
for coverage_file in coverage_files:
|
||||
counter += 1
|
||||
display.info('[%4d/%4d] %s' % (counter, len(coverage_files), coverage_file), verbosity=2)
|
||||
|
||||
original = coverage.CoverageData()
|
||||
|
||||
if os.path.getsize(coverage_file) == 0:
|
||||
|
|
|
@ -29,7 +29,7 @@ find lib/ansible/modules -type d -empty -print -delete
|
|||
function cleanup
|
||||
{
|
||||
if [ "$(ls test/results/coverage/)" ]; then
|
||||
ansible-test coverage xml --color -v --requirements
|
||||
ansible-test coverage xml --color -vv --requirements
|
||||
cp -av test/results/reports/coverage.xml shippable/codecoverage/coverage.xml
|
||||
fi
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
set -o pipefail
|
||||
|
||||
declare -a args
|
||||
IFS='/:' read -ra args <<< "${TEST}"
|
||||
|
||||
version="${args[1]}"
|
||||
|
||||
if [ "${version}" = "3.6" ]; then
|
||||
retry.py add-apt-repository 'ppa:ubuntu-toolchain-r/test'
|
||||
retry.py add-apt-repository 'ppa:fkrull/deadsnakes'
|
||||
|
||||
|
@ -11,7 +17,8 @@ retry.py apt-get install -qq \
|
|||
python3.6-dev \
|
||||
|
||||
ln -sf x86_64-linux-gnu-gcc-4.9 /usr/bin/x86_64-linux-gnu-gcc
|
||||
fi
|
||||
|
||||
retry.py pip install tox --disable-pip-version-check
|
||||
|
||||
ansible-test units --color -v --tox --coverage
|
||||
ansible-test units --color -v --tox --coverage --python "${version}"
|
||||
|
|
Loading…
Reference in a new issue