forked from ckan/ckanext-xloader
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI corrections with ckan 2.9+ prework (#18)
* ci build * correct psycopg2 for later generations of db, ignore masters for now * change os for 2.7 build * handle jetty8 and jetty9 * add xlsx tests, tweak for bionic builds libmagic works differently for xls files * skip xls tests due to libmagic1 changes in os libmagic1 that works out xls is not as forgiving as it once was, the two tests were checking to see if messytables was used or an error thrown on partial load since xls format stopped in 2004, and xlsx is the defacto format for excel this might be ok to ignore now as it still works on Trusty LTS Bionic libmagic1: Installed: 1:5.32-2ubuntu0.4 Candidate: 1:5.32-2ubuntu0.4 Version table: *** 1:5.32-2ubuntu0.4 500 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages 100 /var/lib/dpkg/status Trusty libmagic1: Installed: 1:5.14-2ubuntu3.3 Candidate: 1:5.14-2ubuntu3.3 Version table: *** 1:5.14-2ubuntu3.3 500 500 http://security.ubuntu.com/ubuntu trusty-security/main amd64 Packages 100 /var/lib/dpkg/status * ckan 2.9+ compatibilities paster is replaced with ckan command from 2.9+ unicode, basestring is now just str in python3 deal with version and python differences in the cicd build * python3 flake ur not supported in ptyon3, use br"".decode('raw_unicode_escape')
- Loading branch information
Showing
20 changed files
with
409 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,8 @@ docs/_build/ | |
# editors | ||
.vscode | ||
|
||
ckan | ||
.rdp | ||
.noseids | ||
subdir/ | ||
dump.rdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,65 @@ | ||
os: linux | ||
language: python | ||
|
||
# the new trusty images of Travis cause build errors with psycopg2, see https://github.com/travis-ci/travis-ci/issues/8897 | ||
dist: trusty | ||
group: deprecated-2017Q4 | ||
|
||
dist: bionic | ||
python: | ||
- "2.7" | ||
env: | ||
- CKANVERSION=master | ||
- CKANVERSION=2.8 | ||
- CKANVERSION=2.7 | ||
install: | ||
- bash bin/travis-build.bash | ||
- CKAN_GIT_REPO=ckan CKAN_BRANCH=master | ||
- CKAN_GIT_REPO=ckan CKANVERSION=2.8 | ||
- CKAN_GIT_REPO=qld-gov-au CKAN_BRANCH=qgov-master | ||
services: | ||
- postgresql | ||
- redis | ||
addons: | ||
postgresql: "9.3" | ||
- postgresql | ||
before_install: | ||
- apt-cache policy libmagic1 | ||
install: | ||
- pip install -U pip wheel | ||
- bash bin/travis-build.bash | ||
- pip install coveralls | ||
script: sh bin/travis-run.sh | ||
after_success: coveralls | ||
sudo: required | ||
after_success: | ||
- coveralls | ||
|
||
stages: | ||
- Flake8 | ||
- test | ||
|
||
jobs: | ||
include: | ||
- stage: Flake8 | ||
env: FLAKE8=True | ||
install: | ||
- pip install -U pip wheel | ||
- sh bin/travis-flake.sh | ||
script: | ||
- sh bin/travis-flake-run.sh | ||
- stage: test #master build on python 3 alpha | ||
env: CKAN_GIT_REPO=ckan CKAN_BRANCH=master | ||
python: "3.6" | ||
- stage: test #2.7 build on trusty | ||
# ensure https://travis-ci.org/github/$yourRepo/ckanext-xloader/settings "Enable build config validation" is off if builds are not getting to testing | ||
# the new trusty images of Travis cause build errors with psycopg2 in 2.7 and below, see https://github.com/travis-ci/travis-ci/issues/8897 | ||
# due to psycopg2 2.4 does not support newer db's, https://github.com/psycopg/psycopg2/issues/594 and no backports being given to 2.7 or older | ||
# releases, we need ot hard lock for them. (needs to be on libpq-dev=9.3.* ) | ||
dist: trusty | ||
group: deprecated-2017Q4 #must be upper case but travis "build config validation" if enabled will lowercase it and break the build | ||
env: CKAN_GIT_REPO=ckan CKANVERSION=2.7 | ||
addons: | ||
postgresql: "9.6" | ||
- stage: test #2.8 build on trusty | ||
# ensure https://travis-ci.org/github/$yourRepo/ckanext-xloader/settings "Enable build config validation" is off if builds are not getting to testing | ||
# the new trusty images of Travis cause build errors with psycopg2 in 2.7 and below, see https://github.com/travis-ci/travis-ci/issues/8897 | ||
# due to psycopg2 2.4 does not support newer db's, https://github.com/psycopg/psycopg2/issues/594 and no backports being given to 2.7 or older | ||
# releases, we need ot hard lock for them. (needs to be on libpq-dev=9.3.* ) | ||
dist: trusty | ||
group: deprecated-2017Q4 #must be upper case but travis "build config validation" if enabled will lowercase it and break the build | ||
env: CKAN_GIT_REPO=ckan CKANVERSION=2.8 | ||
addons: | ||
postgresql: "9.6" | ||
allow_failures: | ||
- env: CKAN_GIT_REPO=ckan CKAN_BRANCH=master | ||
python: "3.6" | ||
- env: CKAN_GIT_REPO=ckan CKAN_BRANCH=master | ||
python: "2.7" #master build on python 2 alpha (is it backwards compatible) | ||
|
||
cache: pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -ex | ||
# please start up docker via | ||
# docker run -it -v "`pwd`":/build ubuntu:bionic /bin/bash | ||
# cd /build ;bash -x /build/bin/localPdev.sh | ||
|
||
|
||
|
||
apt-get update | ||
apt-get install -y sudo systemd postgresql-10 git python python-pip redis-server | ||
/etc/init.d/postgresql start | ||
redis-server & | ||
|
||
pip install -U pip wheel | ||
|
||
export CKAN_GIT_REPO=ckan/ckan | ||
export CKANVERSION=2.8 | ||
|
||
bash -x bin/travis-build.bash | ||
|
||
bash -x bin/travis-run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh -e | ||
flake8 --version | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude ckan,ckanext-xloader | ||
|
||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --max-complexity=27 --max-line-length=127 --statistics --exclude ckan,ckanext-xloader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
pip install -U pip wheel | ||
pip install -r flake-requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.