OCA / oca-ci

Container image to run OCA CI tests
MIT License
30 stars 42 forks source link

Add mechanism to fail on WARNING messages in Odoo test log #10

Closed sbidoul closed 1 month ago

rousseldenis commented 2 years ago

Complementary of this, it should be great to have that level on check status : https://github.com/github/feedback/discussions/11592

sbidoul commented 4 months ago

Now that checklog-odoo is a standalone project, we can progress with this.

checklog-odoo can be installed with pipx in the Dockerfile.

One way to approach this is to add an OCA_ENABLE_CHECKLOG_ODOO environment vairable and an oca_checklog_odoo script. If that variable is set, the script runs checklog-odoo. If not set, the script run checklog-odoo -i ".*" to ignore all warnings`.

oca_init_test_database and oca_run_tests can then be adapted to pipe into oca_checklog_odoo.

rousseldenis commented 2 months ago

@sbidoul A POC on what can be the mechanism : https://github.com/OCA/stock-logistics-workflow/pull/1632

sbidoul commented 2 months ago

@rousseldenis yes, I've seen that one. But I think the approach I outlined above will be simpler.

rousseldenis commented 2 months ago

@rousseldenis yes, I've seen that one. But I think the approach I outlined above will be simpler.

Yes, but the difference is that main tests will fail, correct ?

sbidoul commented 2 months ago

Yes, that's the point. I think the vast majority of warnings reveal real bugs that need to be resolved, and there is a way to ignore some with checklog-odoo config if needed.

rousseldenis commented 2 months ago

Yes, that's the point. I think the vast majority of warnings reveal real bugs that need to be resolved, and there is a way to ignore some with checklog-odoo config if needed.

Ok, I +100 for that

sbidoul commented 1 month ago

Done in #77