[PATCH v2 1/3] travis: test against postgresql 10 and 11
Stephen Finucane
stephen at that.guru
Fri Oct 26 21:50:39 AEDT 2018
On Mon, 2018-08-06 at 16:56 +1000, Daniel Black wrote:
> Signed-off-by: Daniel Black <daniel at linux.ibm.com>
> ---
> .travis.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 49 insertions(+), 2 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 6cb983f..58e0b08 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -23,14 +23,61 @@ env:
> global:
> - PW_TEST_DB_PASS=""
>
> +matrix:
> + include:
> + - addons:
> + postgresql: "10"
> + apt:
> + packages:
> + - postgresql-10
> + - postgresql-client-10
> + env:
> + - PGPORT=5433
> + - PW_TEST_DB_PORT=5433
> + - PW_TEST_DB_TYPE=postgres
> + - PW_TEST_DB_USER=travis
> + - PW_TEST_DB_PASS=""
> + python: 3.6
> + sudo: true
> + before_install:
> + - sudo -u postgres psql -c "grant ALL on DATABASE postgres to travis WITH GRANT OPTION;"
> + - env:
> + - PGPORT=5433
> + - PW_TEST_DB_PORT=5433
> + - PW_TEST_DB_TYPE=postgres
> + - PW_TEST_DB_USER=travis
> + - PW_TEST_DB_PASS=""
> + python: 3.6
> + dist: trusty
> + addons:
> + postgresql: "11"
> + apt:
> + sources:
> + - sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg 11'
> + key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
> + packages:
> + - postgresql-11
> + - postgresql-client-11
> + sudo: true
> + before_install:
> + - sudo -u postgres psql -c "grant ALL on DATABASE postgres to travis WITH GRANT OPTION;"
The above has started failing in recent days [1], likely coinciding
with the full release of 11 [2]. I've tried but I can't figure out how
to work around this issue easily. Any chance you could take a look,
Daniel (either one :))?
Stephen
[1] https://travis-ci.org/getpatchwork/patchwork/jobs/446606222
[2] https://www.postgresql.org/about/news/1894/
> +
> +
> before_script:
> - - mysql -e 'create database patchwork character set utf8;'
> - - psql -c "create database patchwork with ENCODING = 'UTF8';" -U postgres
> + - if [[ $PW_TEST_DB_TYPE == mysql ]]; then mysql -e 'create database patchwork character set utf8;'; fi
> + - if [[ $PW_TEST_DB_TYPE == postgres ]]; then psql -c "create database patchwork with ENCODING = 'UTF8';" -U $PW_TEST_DB_USER; fi
>
> install:
> - pip install tox-travis
>
> script:
> + - >
> + if [[ $PW_TEST_DB_TYPE == mysql ]];
> + then
> + mysql -e 'SELECT VERSION(), CURRENT_USER();' -u $PW_TEST_DB_USER patchwork;
> + else
> + psql -c "SELECT VERSION(), CURRENT_USER, current_database()" -U $PW_TEST_DB_USER patchwork;
> + fi
> - tox
> - tox -e coverage
>
More information about the Patchwork
mailing list