[![Build Status](https://travis-ci.org/OCA/maintainer-quality-tools.svg)](https://travis-ci.org/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)
===================================
The goal of Maintainer Quality Tools (MQT) is to provide helpers to ensure the quality of Odoo addons.
Sample travis configuration files
---------------------------------
To configure a repository to use Travis CI with these tools, the easiest is
to start from the `copier` template in https://github.com/OCA/oca-addons-repo-template.
Dependencies on other OCA repositories
--------------------------------------
If your project depends on other OCA or other Github repositories, create a file called `oca_dependencies.txt` at the root of your project and list the dependencies there. One per line like so:
project_name optional_repository_url optional_branch_name
During testbed setup, MQT will automatically download and place these repositories accordingly into the addon path.
Note on addons path ordering: They will be placed after your own repo, but before the odoo core repo.
TODO: document MQT_DEP=PIP mode
Check your .travis file for syntax issues
-----------------------------------------
You can test your .travis file in [this linter](http://lint.travis-ci.org/).
This is very useful when you are improving your file.
Multiple values for environment variable VERSION
------------------------------------------------
You can use branch or pull request into environment variable VERSION:
- Branch 10.0
```
VERSION="10.0" ODOO_REPO="odoo/odoo"
```
- Pull request odoo/odoo#143
```
VERSION="pull/143" ODOO_REPO="odoo/odoo"
```
Using custom branch inside odoo repository using ODOO_BRANCH
------------------------------------------------------------
You can use the custom branch into the ODOO_REPO using the environment variable ODOO_BRANCH:
- Branch saas-17
```
ODOO_REPO="odoo/odoo" ODOO_BRANCH="saas-17"
```
Module unit tests
-----------------
MQT is also capable to test each module individually.
The intention is to check if all dependencies are correctly defined.
Activate it through the `UNIT_TEST` directive.
An additional line should be added to the `env:` section,
similar to this one:
- VERSION="8.0" UNIT_TEST="1"
Codecov configuration file
--------------------------
[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
from coverage check.
See [maintainer-tools CONTRIBUTING doc](https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#tests) for further info on tests.
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
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:
`MQT_TEMPLATE_DB='mqt_odoo_template' MQT_TEST_DB='mqt_odoo_test'`.
Give us feedback on you experiences, and if you could share findings
from your use case, there might be some grateful people arround.
Isolated pylint+flake8 checks
-----------------------------
If you want to make a build exclusive for these checks, you can add a line
on the `env:` section of the .travis.yml file with this content:
- VERSION="7.0" LINT_CHECK="1"
You will get a faster answer about these questions and also a fast view over
semaphore icons in Travis build view.
To avoid making again these checks on other builds, you have to add
LINT_CHECK="0" variable on the line:
- VERSION="7.0" ODOO_REPO="odoo/odoo" LINT_CHECK="0"
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,
but whithout running any tests.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
面向Odoo维护者的QA工具___下载.zip (94个子文件)
maintainer-quality-tools-master
.editorconfig 44B
LICENSE.md 33KB
.travis.yml 3KB
.coveragerc 363B
tests
test_repo_with_subfolders
1_testfolder
addons4
__init__.py 11B
__manifest__.py 192B
addons3
__init__.py 11B
__manifest__.py 192B
2_testfolder
addons1
__init__.py 11B
__manifest__.py 192B
addons2
__init__.py 11B
__manifest__.py 192B
test_repo
broken_lint
case_fields.py 570B
__init__.py 107B
eval_referenced.py 420B
case_deprecated.py 400B
case_import.py 859B
xml_syntax_error.xml 59B
__openerp__.py 245B
broken_uninstallable
__init__.py 142B
doc
index.rst 54B
interpreter_wox.py 113B
test.yml 115B
README.rst 94B
tests
__init__.py 49B
dummy_test.py 249B
model.py 1KB
I0013.py 20B
model_view.xml 1KB
__openerp__.py 412B
oca_dependencies.txt 200B
broken_deprecated
__init__.py 56B
security
ir.model.access.csv 192B
README.rst 216B
model_deprecated.py 312B
__openerp__.py 324B
broken_module
broken_example.js 233B
__init__.py 142B
broken_example2.js 187B
security
ir.model.access.csv 180B
doc
index.rst 54B
interpreter_wox.py 113B
test.yml 117B
README.rst 54B
tests
__init__.py 49B
dummy_test.py 249B
model.py 2KB
model_view.xml 1KB
__openerp__.py 466B
broken_no_access_rule
__init__.py 50B
README.rst 216B
dummy_model.py 224B
__openerp__.py 269B
second_module
__init__.py 31B
__openerp__.py 243B
test_module
__init__.py 50B
security
ir.model.access.csv 183B
doc
index.rst 216B
README.rst 216B
dummy_model.py 430B
__openerp__.py 330B
static
description
icon.png 9KB
requirements.txt 277B
.gitignore 23B
cfg
.coveragerc 567B
travis
test_pylint 2KB
travis_helpers.py 570B
travis_after_tests_success 197B
travis_makepot 4KB
pylint_deprecated_modules
pdb.py 0B
ipdb.py 0B
openerp
__init__.py 68B
osv
__init__.py 0B
README.md 174B
pudb.py 0B
self_tests 14KB
apis.py 3KB
travis_install_nightly 8KB
test_server.py 19KB
travis_run_flake8 120B
clone_oca_dependencies 5KB
git_run.py 1KB
cfg
travis_run_pylint.cfg 1KB
travis_run_pylint_exclude_61.cfg 785B
travis_run_flake8__init__.cfg 293B
travis_run_pylint_beta.cfg 3KB
travis_run_pylint_pr.cfg 1KB
travis_run_flake8.cfg 445B
travis_run_pylint_exclude_70.cfg 784B
getaddons.py 7KB
travis_run_tests 3KB
run_pylint.py 12KB
test_flake8 837B
README.md 4KB
共 94 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9149
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功