diff mbox series

[4/4] Test postgresql support in Travis CI

Message ID 20170903151444.25660-5-dja@axtens.net
State Superseded
Delegated to: Stephen Finucane
Headers show
Series PostgreSQL fixes and test support | expand

Commit Message

Daniel Axtens Sept. 3, 2017, 3:14 p.m. UTC
Use the most recent version of postgres (9.6) because we need a
more recent version than the default to show up the broken
bundle behaviour.

This should prevent us from causing any further regressions.

I've also had to flick from using the 'travis' user to the 'root'
user for mysql - not entirely sure why it suddenly broke, but oh
well.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 .travis.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Stephen Finucane Sept. 7, 2017, 6:32 p.m. UTC | #1
On Mon, 2017-09-04 at 01:14 +1000, Daniel Axtens wrote:
> Use the most recent version of postgres (9.6) because we need a
> more recent version than the default to show up the broken
> bundle behaviour.
> 
> This should prevent us from causing any further regressions.
> 
> I've also had to flick from using the 'travis' user to the 'root'
> user for mysql - not entirely sure why it suddenly broke, but oh
> well.
> 
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
>  .travis.yml | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 25d150e3e3db..f19fe4f3fa35 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -1,5 +1,6 @@
>  language: python
>  
> +dist: trusty

Why is this trusty rather than xenial?

>  sudo: false
>  
>  python:
> @@ -7,17 +8,24 @@ python:
>    - 3.4
>    - 3.5
>  
> +addons:
> +  postgresql: "9.6"
> +
>  services:
>    - mysql
> +  - postgresql
>  
>  env:
> +  matrix:
> +    - PW_TEST_DB_TYPE=postgres PW_TEST_DB_USER=postgres
> +    - PW_TEST_DB_TYPE=mysql PW_TEST_DB_USER=root

Related to the above?

>    global:
> -    - PW_TEST_DB_USER=travis
>      - PW_TEST_DB_PASS=""
>      - PW_SKIP_BROWSER_TESTS=yes
>  
>  before_script:
>    - mysql -e 'create database patchwork character set utf8;'
> +  - psql -c "create database patchwork with ENCODING = 'UTF8';" -U postgres
>  
>  install:
>    - pip install tox-travis

Can't argue with any of this, to be honest. However, I'm assuming you've tested
this against your private repo. Does it work with tox-travis as expected? I'd
expect to see 2x the # of jobs - are we seeing these?

Stephen
Daniel Axtens Sept. 26, 2017, 11:27 a.m. UTC | #2
Hi Stephen,

>> +dist: trusty
>
> Why is this trusty rather than xenial?

Because Travis suuuper out of date, it supports precise and trusty for
now.

>
>>  sudo: false
>>  
>>  python:
>> @@ -7,17 +8,24 @@ python:
>>    - 3.4
>>    - 3.5
>>  
>> +addons:
>> +  postgresql: "9.6"
>> +
>>  services:
>>    - mysql
>> +  - postgresql
>>  
>>  env:
>> +  matrix:
>> +    - PW_TEST_DB_TYPE=postgres PW_TEST_DB_USER=postgres
>> +    - PW_TEST_DB_TYPE=mysql PW_TEST_DB_USER=root
>
> Related to the above?
>
Yes, this gives us a matrix with two entries, one postgres and one mysql.

>>    global:
>> -    - PW_TEST_DB_USER=travis
>>      - PW_TEST_DB_PASS=""
>>      - PW_SKIP_BROWSER_TESTS=yes
>>  
>>  before_script:
>>    - mysql -e 'create database patchwork character set utf8;'
>> +  - psql -c "create database patchwork with ENCODING = 'UTF8';" -U postgres
>>  
>>  install:
>>    - pip install tox-travis
>
> Can't argue with any of this, to be honest. However, I'm assuming you've tested
> this against your private repo. Does it work with tox-travis as expected? I'd
> expect to see 2x the # of jobs - are we seeing these?
>
Yes: https://travis-ci.org/daxtens/patchwork/builds/271401910
(v2 to come soon)

Regards,
Daniel
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 25d150e3e3db..f19fe4f3fa35 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@ 
 language: python
 
+dist: trusty
 sudo: false
 
 python:
@@ -7,17 +8,24 @@  python:
   - 3.4
   - 3.5
 
+addons:
+  postgresql: "9.6"
+
 services:
   - mysql
+  - postgresql
 
 env:
+  matrix:
+    - PW_TEST_DB_TYPE=postgres PW_TEST_DB_USER=postgres
+    - PW_TEST_DB_TYPE=mysql PW_TEST_DB_USER=root
   global:
-    - PW_TEST_DB_USER=travis
     - PW_TEST_DB_PASS=""
     - PW_SKIP_BROWSER_TESTS=yes
 
 before_script:
   - mysql -e 'create database patchwork character set utf8;'
+  - psql -c "create database patchwork with ENCODING = 'UTF8';" -U postgres
 
 install:
   - pip install tox-travis