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

Remove coverall suport, install codecov in travis_after_test_success #648

Merged
merged 1 commit into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ 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

script:
- TRAVIS_PULL_REQUEST="1" coverage run --append ./travis/travis_run_tests 8.0 # only used if VERSION not set in env
- TRAVIS_PULL_REQUEST="1" coverage run ./travis/travis_run_tests 8.0 # only used if VERSION not set in env
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the root cause was this.

- coverage run --append ./travis/self_tests

after_success:
Expand Down
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