Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
remove coverall support
Browse files Browse the repository at this point in the history
Also, install codecov only when needed
to avoid having uneeded and possibly conflicting dependencies
during tests
  • Loading branch information
sbidoul committed Mar 21, 2020
1 parent 6ab7d44 commit 384ded8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ install:
- cp -r tests/test_repo/* ./
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
# Force install lint requirements in all cases of MQT for self_test script.
- pip install codecov==2.0.15 coveralls==1.8.2
- pip install coverage
- LINT_CHECK="1" travis_install_nightly 8.0 # only used if VERSION not set in env
- git --git-dir=${TRAVIS_BUILD_DIR}/.git add --all # All modules moved are modules changed to test PR changes

Expand All @@ -81,4 +81,4 @@ after_success:
# Seudo-fix for codecov that is not processing "data_file" parameter
# More info about: https://github.com/codecov/codecov-python/issues/120
- cp ./.coverage_mqt ./.coverage
- TESTS="1" LINT_CHECK="0" travis_after_tests_success
- TESTS="1" TEST_ENABLE="1" LINT_CHECK="0" travis_after_tests_success
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.org/OCA/maintainer-quality-tools.svg)](https://travis-ci.org/OCA/maintainer-quality-tools)
[![Coverage Status](https://coveralls.io/repos/OCA/maintainer-quality-tools/badge.svg)](https://coveralls.io/r/OCA/maintainer-quality-tools)
[![codecov](https://codecov.io/gh/OCA/maintainer-quality-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/OCA/maintainer-quality-tools)

QA Tools for Odoo maintainers (MQT)
===================================
Expand Down Expand Up @@ -64,12 +64,12 @@ similar to this one:
- VERSION="8.0" UNIT_TEST="1"


Coveralls/Codecov configuration file
------------------------------------
Codecov configuration file
--------------------------

[Coveralls](https://coveralls.io/) and [Codecov](https://codecov.io/) services provide information on the test coverage of your modules.
Currently both configurations are automatic (check default configuration [here](cfg/.coveragerc)).
So, as of today, you don't need to include a `.coveragerc` into the repository,
[Codecov](https://codecov.io/) provides information on the test coverage of your modules.
The configurations is automatic (check default configuration [here](cfg/.coveragerc)).
So you don't need to include a `.coveragerc` into the repository,
If you do it, it will be simply ignored.

**NOTE:** the current configuration automatically ignores `*_example` modules
Expand All @@ -80,7 +80,7 @@ Names used for the test databases
---------------------------------

MQT has a nice feature of organizing your testing databases.
You might want to do that if you want to double them up as
You might want to do that if you want to double them up as
staging DBs or if you want to work with an advanced set of
templates in order to speed up your CI pipeline.
Just specify at will:
Expand Down Expand Up @@ -110,5 +110,5 @@ Disable test
If you want to make a build without tests, you can use the following directive:
`TEST_ENABLE="0"`

You will simply get the databases with packages installed,
You will simply get the databases with packages installed,
but whithout running any tests.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pyserial
pyopenssl>=16.2.0
pyyaml==3.12 ; python_version < '3.7'
pyyaml==3.13 ; python_version >= '3.7'
coveralls
websocket-client
unittest2
six
Expand Down
2 changes: 1 addition & 1 deletion sample_files/.gitlab-ci-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variables:
before_script:
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get install -y sudo postgresql-client expect-dev python-lxml nodejs python-dev python-pip build-essential libsasl2-dev python-dev libldap2-dev libssl-dev
- pip install codecov==2.0.15 coveralls==1.8.2 coverage
- pip install coverage

lint:
stage: test
Expand Down
28 changes: 7 additions & 21 deletions travis/travis_after_tests_success
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
#!/usr/bin/env python

import os

from coverage.cmdline import main as coverage_main
from coveralls import cli as coveralls_cli
from codecov import main as codecov_main


if (os.environ.get('TESTS', '1') == '1' and
os.environ.get('TEST_ENABLE', '1') == '1' and
not os.environ.get('LINT_CHECK') == '1'):
coverage_main(["report", "--show-missing"])
try:
coveralls_cli.main(argv=None)
except:
pass
try:
codecov_main(argv=None)
except:
pass
#!/bin/bash
set -e
if [[ "${TESTS:-1}" == "1" ]] && [[ "${TEST_ENABLE:-1}" == "1" ]] && [[ "${LINT_CHECK}" != "1" ]]; then
coverage report --show-missing
pip install codecov
codecov
fi
9 changes: 5 additions & 4 deletions travis/travis_install_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ sed -i '/^python-ldap\=\=/d' ${ODOO_PATH}/requirements.txt
sed -i 's/^requests\=\=/requests[security]\=\=/g' ${ODOO_PATH}/requirements.txt

pip install -q --no-binary pycparser -r ${ODOO_PATH}/requirements.txt
pip install -q QUnitSuite codecov==2.0.15 coveralls==1.8.2

# Use reference .coveragerc
cp ${HOME}/maintainer-quality-tools/cfg/.coveragerc .
pip install -q QUnitSuite

MQT_DEP=${MQT_DEP:-OCA}
if [[ "${MQT_DEP}" == "OCA" ]] ; then
Expand All @@ -129,6 +126,10 @@ else
--extra-index-url https://wheelhouse.odoo-community.org/oca-simple/
fi

# Use reference .coveragerc
cp ${HOME}/maintainer-quality-tools/cfg/.coveragerc .
pip install coverage

if [[ "${WKHTMLTOPDF_VERSION}" == "" && $(which wkhtmltopdf) != "" ]]; then
echo "You have installed wkhtmltopdf but is not patched (probably) then we will overwrite it"
export WKHTMLTOPDF_VERSION="0.12.4"
Expand Down

0 comments on commit 384ded8

Please sign in to comment.