modoboa icon indicating copy to clipboard operation
modoboa copied to clipboard

Improve travis test with TOXENV

Open kryskool opened this issue 7 years ago • 9 comments

Description of the issue/feature this PR addresses:

Use TOXENV with travis

kryskool avatar Apr 12 '18 19:04 kryskool

@kryskool Looks like travis build has not been triggered?

tonioo avatar Apr 13 '18 07:04 tonioo

The travis.yml syntax is incorrect, TOXENV needs to be under env -> matrix (where DB used to be)

You'll also have issues with Python > 3.4 not being installed as Travis only installs the python version specified in the python setting (2.7 and 3.4 are installed by default in Debian)

On April 13, 2018 7:08:50 AM UTC, Antoine Nguyen [email protected] wrote:

@kryskool Looks like travis build has not been triggered?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/modoboa/modoboa/pull/1465#issuecomment-381044897

ghost avatar Apr 13 '18 08:04 ghost

Hi @fyfe

Your right, i rewrite the .travis.yml file. it works now

Regards,

kryskool avatar Apr 14 '18 12:04 kryskool

Hi @tonioo

It's seem there is a problem with entities in Python 3 and SQLite

FAIL: test_map_upgrade (modoboa.admin.tests.test_mapfiles.MapFilesTestCase)
Check that map content is used.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/modoboa/modoboa/.tox/py35-dj111-sqlite/lib/python3.5/site-packages/modoboa/admin/tests/test_mapfiles.py", line 49, in test_map_upgrade
    self.assertEqual(mapcontent["dbpath"], dbsettings["NAME"])
AssertionError: 'file:memorydb_default?mode=memory&cache=shared' != 'file:memorydb_default?mode=memory&cache=shared'
- file:memorydb_default?mode=memory&cache=shared
?                                   ----
+ file:memorydb_default?mode=memory&cache=shared

Regards,

kryskool avatar Apr 14 '18 12:04 kryskool

@kryskool the Django 2 builds are using Django 1.11.12

https://travis-ci.org/modoboa/modoboa/jobs/366485787#L628

py35-dj20-postgres installed: [cut],Django==1.11.12,[cut]

ghost avatar Apr 14 '18 13:04 ghost

@fyfe thnaks for the review

yes i prefer your solution, i change my code

@kryskool the Django 2 builds are using Django 1.11.12 https://travis-ci.org/modoboa/modoboa/jobs/366485787#L628

I must check the tox.ini file

Regards,

kryskool avatar Apr 14 '18 13:04 kryskool

I think we must protect password if containt HTML entities

kryskool avatar Apr 14 '18 13:04 kryskool

Hi. In django-webtest I've created a py script to convert tox -l to a travis conf: https://github.com/django-webtest/django-webtest/blob/master/django_webtest_tests/tox2travis.py Maybe this can work for you too.

gawel avatar Apr 14 '18 15:04 gawel

@kryskool I guess we can close this PR. What do you think?

tonioo avatar Jun 30 '21 09:06 tonioo