这些都是应该运行的脚本吗?
checkcommit
runcheckendline
runcheckmigration
runflake8
runisort
但是,其中一些检查不适用于所有存储库,您将如何解决该问题?
例如, runcheckmigration
不会真正应用于openwisp-website
,但checkcommit
和runcheckendline
仍应运行。
@dwang我在想命令行变量,默认情况下,所有任务都会运行,
但是,如果我想避免runcheckmigration
,我可以简单地执行--no-runcheckmigration
来避免运行该脚本,您对此有何看法? :微笑:
听起来不错!
@atb00ker这听起来很棒! 你在研究这个吗?
不,我目前没有工作。 :微笑:
好的,我现在正在处理
@atb00ker脚本应该按什么顺序运行?
我看到checkcommit
和runcheckendline
应该在每个 repo 上运行。
所以我将最多采用 3 个参数
测试不相互依赖,因此顺序无关紧要。
您可以检出每个存储库中的.travis.yml
文件,以检出该特定存储库上正在运行的测试。
为以下存储库签出相同的内容:
- django-ipam
- openwisp-ipam
- django-freeradius
- openwisp-freeradius
- openwisp-users
- openwisp-utils
- openwisp-config
- openwisp-controller
- django-loci
- django-netjsonconfig
- django-x509
@atb00ker我看到每个存储库中的 .travis.yml 文件分为 3 部分
./runflake8
, ./runisort
, ./runcheckmigration
等被调用checkcommit
在这里运行并调用存储库特定的测试,即 jshint、./runtest、 coverage
等。pip install openwisp-utils[qa]>=0.2.1
在 openwisp-config 中pip install https://github.com/openwisp/openwisp-utils/tarball/master
在 OpenWISP 网站pip install https://github.com/openwisp/openwisp-utils/tarball/master#egg=openwisp_utils --upgrade
在 openwisp-userspip install -U https://github.com/openwisp/openwisp-utils/tarball/master
在 django-freeradiuspip install --user https://github.com/openwisp/openwisp-utils/tarball/master
在 ansible-openwisp 中有些在requirements-test.txt中有一行也是存储库中存在的测试文件的副本我想包括openwisp-utils的
几个问题:
请让我知道您对此的看法:)
@ankit-kumar-dwivedi 不在“脚本”部分运行“before_install”脚本。 这是我试图解释原因(感谢更正)-
之前运行一些脚本可能需要正确运行主脚本。
& 如果任何“before_script”或“after_script”失败,它不会影响整体构建“状态”。
“例如,runcheckmigration 不会真正适用于 openwisp-website,但仍应运行 checkcommit 和 runcheckendline。”
我认为我们需要为排除存储库添加变量。 @dwang
@ankit-kumar-dwivedi
由 #45 关闭