annotate .travis.yml @ 8408:e882a5d52ae5

refactor: move RateLimitExceeded to roundup.cgi.exceptions RateLimitExceeded is an HTTP exception that raises code 429. Move it to roundup.cgi.exceptions where all the other exceptions that result in http status codes are located. Also make it inherit from HTTPException since it is one. Also add docstrings for all HTTP exceptions and order HTTPExceptions by status code. BREAKING CHANGE: if somebody is importing RateLimitExceeded they will need to change their import. I consider it unlikely anybody is using RateLimitExceeded. Detectors and extensions are unlikely to raise RateLimitExceeded. So I am leaving it out of the upgrading doc. Just doc in change log.
author John Rouillard <rouilj@ieee.org>
date Sun, 10 Aug 2025 21:27:06 -0400
parents 8c17d0def3f3
children 370689471a08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6501
89c4fb277a49 Add link to syntax checker.
John Rouillard <rouilj@ieee.org>
parents: 6499
diff changeset
1 # check syntax using:
7450
2da90d07e8bd gratuitous change so I can supporess github ci.
John Rouillard <rouilj@ieee.org>
parents: 7449
diff changeset
2 # https://config.travis-ci.com/explore
6501
89c4fb277a49 Add link to syntax checker.
John Rouillard <rouilj@ieee.org>
parents: 6499
diff changeset
3
7408
8a9f1732c4b6 Add comment on how to skip ci for travis.
John Rouillard <rouilj@ieee.org>
parents: 7256
diff changeset
4 # have commit skip build by adding '[skip travis]' to commit message.
8a9f1732c4b6 Add comment on how to skip ci for travis.
John Rouillard <rouilj@ieee.org>
parents: 7256
diff changeset
5
6217
10d7700ff6ad Fix errors in spec: add os, no sudo, rename matrix to jobs/fix
John Rouillard <rouilj@ieee.org>
parents: 6101
diff changeset
6 os: linux
10d7700ff6ad Fix errors in spec: add os, no sudo, rename matrix to jobs/fix
John Rouillard <rouilj@ieee.org>
parents: 6101
diff changeset
7
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
8 language: python
5777
14500cf8de7b Try to set up testing on python 3.7 allow failures so if it tanks the
John Rouillard <rouilj@ieee.org>
parents: 5751
diff changeset
9
5935
f18f12d6ce9a Enable pip caching in travis. Try to get the build times down.
John Rouillard <rouilj@ieee.org>
parents: 5932
diff changeset
10 cache: pip
f18f12d6ce9a Enable pip caching in travis. Try to get the build times down.
John Rouillard <rouilj@ieee.org>
parents: 5932
diff changeset
11
5816
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
12 #I would like to build and test the maint-1.6 and trunk/default
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
13 #but we need different environments for these:
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
14 # maint-1.6 only python 2, install only psycopg2 version with support for
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
15 # psycopg1
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
16 branches:
7513
fa4a5926339a Disable dependabot branches from being ci'ed.
John Rouillard <rouilj@ieee.org>
parents: 7512
diff changeset
17 except:
fa4a5926339a Disable dependabot branches from being ci'ed.
John Rouillard <rouilj@ieee.org>
parents: 7512
diff changeset
18 - /^dependabot\/.*$/
5816
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
19 # only:
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
20 # - default
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
21 # - maint-1.6
75296ce63f25 Document what I would like for testing maint-1.6 release. Don't know
John Rouillard <rouilj@ieee.org>
parents: 5798
diff changeset
22
6741
f36b66305200 revert attempt to build from jammy
John Rouillard <rouilj@ieee.org>
parents: 6740
diff changeset
23 dist: focal
5781
6d750ae6efe5 Try implementing tests in 2.7 , 3.4...3.7 python.
John Rouillard <rouilj@ieee.org>
parents: 5780
diff changeset
24
6503
4c7381f5051b Enable bionic build replacing xenail
John Rouillard <rouilj@ieee.org>
parents: 6501
diff changeset
25 python:
6735
e8607971d3d1 re-enable other python versions.
John Rouillard <rouilj@ieee.org>
parents: 6734
diff changeset
26 - 2.7
7511
6173bbd0e014 Disable all but 2.7 and nightly testing.
John Rouillard <rouilj@ieee.org>
parents: 7509
diff changeset
27 # - 3.10.4
6702
0f761d8280f3 reduce spend on travisci by tsting oldest supported, newest stable and newest unstable
John Rouillard <rouilj@ieee.org>
parents: 6692
diff changeset
28 # - 3.9
0f761d8280f3 reduce spend on travisci by tsting oldest supported, newest stable and newest unstable
John Rouillard <rouilj@ieee.org>
parents: 6692
diff changeset
29 # - 3.8
7511
6173bbd0e014 Disable all but 2.7 and nightly testing.
John Rouillard <rouilj@ieee.org>
parents: 7509
diff changeset
30 # - 3.6
6173bbd0e014 Disable all but 2.7 and nightly testing.
John Rouillard <rouilj@ieee.org>
parents: 7509
diff changeset
31 # - 3.11-dev
7623
3df2441f3a1e build: revert all attempts to disable docs
John Rouillard <rouilj@ieee.org>
parents: 7622
diff changeset
32 # - nightly
6720
9db9687d9433 Try to save cycles. Don't build xapian docs.
John Rouillard <rouilj@ieee.org>
parents: 6715
diff changeset
33 # - pypy3
6503
4c7381f5051b Enable bionic build replacing xenail
John Rouillard <rouilj@ieee.org>
parents: 6501
diff changeset
34
4c7381f5051b Enable bionic build replacing xenail
John Rouillard <rouilj@ieee.org>
parents: 6501
diff changeset
35 services:
4c7381f5051b Enable bionic build replacing xenail
John Rouillard <rouilj@ieee.org>
parents: 6501
diff changeset
36 - mysql
4c7381f5051b Enable bionic build replacing xenail
John Rouillard <rouilj@ieee.org>
parents: 6501
diff changeset
37 - postgresql
7191
c6f85484d8a4 use redis rather than redis-server
John Rouillard <rouilj@ieee.org>
parents: 7190
diff changeset
38 - redis
6449
335c826cc089 Setup for moving to use bionic 18.04 ubuntu from 16.04
John Rouillard <rouilj@ieee.org>
parents: 6383
diff changeset
39
6217
10d7700ff6ad Fix errors in spec: add os, no sudo, rename matrix to jobs/fix
John Rouillard <rouilj@ieee.org>
parents: 6101
diff changeset
40 jobs:
6720
9db9687d9433 Try to save cycles. Don't build xapian docs.
John Rouillard <rouilj@ieee.org>
parents: 6715
diff changeset
41 allow_failures: # releases not ready for prime time yet.
6217
10d7700ff6ad Fix errors in spec: add os, no sudo, rename matrix to jobs/fix
John Rouillard <rouilj@ieee.org>
parents: 6101
diff changeset
42 - python: nightly
6691
1754f5e888cd let python 3.11-dev fail without failing the build
John Rouillard <rouilj@ieee.org>
parents: 6690
diff changeset
43 - python: 3.11-dev
6537
1ce082ea7f48 Add testing for pypy3 and 3.9 released replaces 3.9-dev.
John Rouillard <rouilj@ieee.org>
parents: 6533
diff changeset
44 - python: pypy3
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
45
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
46 addons:
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
47 apt:
6597
20632fdee6da try focal upgrade again. mysql user creation/grant updated
John Rouillard <rouilj@ieee.org>
parents: 6596
diff changeset
48 #sources:
20632fdee6da try focal upgrade again. mysql user creation/grant updated
John Rouillard <rouilj@ieee.org>
parents: 6596
diff changeset
49 # - sourceline: ppa:xapian-backports/ppa
5375
1ad46057ae4a Test against latest version of Xapian
John Kristensen <john@jerrykan.com>
parents: 5373
diff changeset
50
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
51 packages:
6713
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
52 # Required to build/install the xapian-binding
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
53 - libxapian-dev
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
54 # Required to install gpg
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
55 - swig
5499
a801eb13ab94 Install gpgsm in .travis.yml for building gpgme.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5498
diff changeset
56 # Required to build gpgme.
a801eb13ab94 Install gpgsm in .travis.yml for building gpgme.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5498
diff changeset
57 - gpgsm
7196
63ef1aa414b8 Try system packaged libgpgme-dev to allow pip install gpg; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7195
diff changeset
58 - libgpgme-dev
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
59
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
60 before_install:
7188
914a2f872854 Remove distro-info package to try to get travisci working again
John Rouillard <rouilj@ieee.org>
parents: 7169
diff changeset
61 # deal with setuptools error:
914a2f872854 Remove distro-info package to try to get travisci working again
John Rouillard <rouilj@ieee.org>
parents: 7169
diff changeset
62 # pkg_resources.extern.packaging.version.InvalidVersion: Invalid
914a2f872854 Remove distro-info package to try to get travisci working again
John Rouillard <rouilj@ieee.org>
parents: 7169
diff changeset
63 # version: '0.23ubuntu1' (package: distro-info)
914a2f872854 Remove distro-info package to try to get travisci working again
John Rouillard <rouilj@ieee.org>
parents: 7169
diff changeset
64 - sudo apt-get remove distro-info
7190
188c3f780f79 pin setuptools in pip not apt geesh....
John Rouillard <rouilj@ieee.org>
parents: 7189
diff changeset
65 # pin setuptools to try to get gpgme to build
188c3f780f79 pin setuptools in pip not apt geesh....
John Rouillard <rouilj@ieee.org>
parents: 7189
diff changeset
66 - pip install "setuptools<66"
7195
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
67 - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then sudo apt-get install python3-gpg; fi
6715
19c7ebe5e5ac Skip xapian builds for nightly and 3.11-dev.
John Rouillard <rouilj@ieee.org>
parents: 6714
diff changeset
68 # build xapian
6713
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
69 - echo "$TRAVIS_PYTHON_VERSION"
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
70 # Sphinx required to build the xapian python bindings. Use 1.8.5 on
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
71 # older python and newest on newer.
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
72 - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then pip install sphinx==1.8.5; fi
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
73 - if [[ $TRAVIS_PYTHON_VERSION == '3.'* ]] ; then pip install sphinx; fi
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
74 - if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then pip install sphinx; fi
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
75 - XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1); echo $XAPIAN_VER
6734
33425fb9091e Disable xapian build on nightly/3.12 again.
John Rouillard <rouilj@ieee.org>
parents: 6733
diff changeset
76 # force specific version 1.4.19 for python 3.12 for debugging
7115
ddc007819528 see if 3.12 xapian is working on traivs-ci
John Rouillard <rouilj@ieee.org>
parents: 6814
diff changeset
77 # #REMOVE# - if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then XAPIAN_VER=1.4.19; fi; echo $XAPIAN_VER
6713
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
78 - cd /tmp
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
79 - curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
80 - tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
81 - cd xapian-bindings-$XAPIAN_VER/
2bae523e78a0 Build xapian.
John Rouillard <rouilj@ieee.org>
parents: 6712
diff changeset
82 - echo $TRAVIS_PYTHON_VERSION
7623
3df2441f3a1e build: revert all attempts to disable docs
John Rouillard <rouilj@ieee.org>
parents: 7622
diff changeset
83 - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then ./configure --prefix=$VIRTUAL_ENV --with-python --disable-documentation; fi
6721
c6dc2e8d59a8 Try to fix install failure for xapian on 3.11-dev and newer.
John Rouillard <rouilj@ieee.org>
parents: 6720
diff changeset
84 # edit the configure script. distutils.sysconfig.get_config_vars('SO')
c6dc2e8d59a8 Try to fix install failure for xapian on 3.11-dev and newer.
John Rouillard <rouilj@ieee.org>
parents: 6720
diff changeset
85 # doesn't work for 3.11 or newer.
6726
189f5c1656fd Remove debugging; cleanup; xapian working for 3.11-dev at least.
John Rouillard <rouilj@ieee.org>
parents: 6725
diff changeset
86 # Change distutils.sysconfig... to just sysconfig and SO to EXT_SUFFIX
189f5c1656fd Remove debugging; cleanup; xapian working for 3.11-dev at least.
John Rouillard <rouilj@ieee.org>
parents: 6725
diff changeset
87 # to get valid value.
7623
3df2441f3a1e build: revert all attempts to disable docs
John Rouillard <rouilj@ieee.org>
parents: 7622
diff changeset
88 - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then sed -i -e '/PYTHON3_SO=/s/distutils\.//g' -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
3df2441f3a1e build: revert all attempts to disable docs
John Rouillard <rouilj@ieee.org>
parents: 7622
diff changeset
89 - if [[ $TRAVIS_PYTHON_VERSION == "nightly" ]]; then sed -i -e '/PYTHON3_SO=/s/distutils\.//g' -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
3df2441f3a1e build: revert all attempts to disable docs
John Rouillard <rouilj@ieee.org>
parents: 7622
diff changeset
90 - if [[ $TRAVIS_PYTHON_VERSION == "pypy3" ]]; then sed -i -e '/PYTHON3_SO=/s/distutils\.//g' -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
7115
ddc007819528 see if 3.12 xapian is working on traivs-ci
John Rouillard <rouilj@ieee.org>
parents: 6814
diff changeset
91 - case "$TRAVIS_PYTHON_VERSION" in disable) echo skipping xapian build;; *) make && make install; esac
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
92
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
93 - PATH=$VIRTUAL_ENV/bin:$PATH
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
94
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
95 # libgpg-error
6540
7c73992d8713 Comment out pyp3.
John Rouillard <rouilj@ieee.org>
parents: 6538
diff changeset
96 - LIBGPG_ERROR_VERSION=1.43
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
97 - cd /tmp
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
98 - curl -s -O https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2
5497
f7330c11b771 Fix tar commands in .travis.yml.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5496
diff changeset
99 - tar -jxvf libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
100 - cd libgpg-error-$LIBGPG_ERROR_VERSION
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
101 - ./configure --prefix=$VIRTUAL_ENV
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
102 - make && make install
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
103
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
104 # libassuan
6540
7c73992d8713 Comment out pyp3.
John Rouillard <rouilj@ieee.org>
parents: 6538
diff changeset
105 - LIBASSUAN_VERSION=2.5.5
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
106 - cd /tmp
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
107 - curl -s -O https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-$LIBASSUAN_VERSION.tar.bz2
5497
f7330c11b771 Fix tar commands in .travis.yml.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5496
diff changeset
108 - tar -jxvf libassuan-$LIBASSUAN_VERSION.tar.bz2
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
109 - cd libassuan-$LIBASSUAN_VERSION
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
110 - ./configure --prefix=$VIRTUAL_ENV
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
111 - make && make install
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
112
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
113 # gpgme
7195
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
114 #- GPGME_VERSION=1.18.0
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
115 #- cd /tmp
7199
a94e223f1e3e see if setuptools is at version > 66 when gpgme would be compiled.
John Rouillard <rouilj@ieee.org>
parents: 7198
diff changeset
116 - pip install "setuptools<66"
7195
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
117 #- curl -s -O https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-$GPGME_VERSION.tar.bz2
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
118 #- tar -jxf gpgme-$GPGME_VERSION.tar.bz2
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
119 #- cd gpgme-$GPGME_VERSION
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
120 #- ./configure --prefix=$VIRTUAL_ENV
3a0b50567755 Try system packaged python*gpg; comnent out build; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7193
diff changeset
121 #- make && make install
5496
5dc0214d7572 attempt to compile gpgme and dependencies for travis-ci
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5495
diff changeset
122
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
123 # change back to the checked out repository directory
7197
3cb3406ead4f Change back to original directory; no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7196
diff changeset
124 - cd $TRAVIS_BUILD_DIR
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
125
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
126 install:
5921
50ac0d3c50b9 support python 3.4 testing
John Rouillard <rouilj@ieee.org>
parents: 5920
diff changeset
127 - if [[ $TRAVIS_PYTHON_VERSION == "3.4"* ]]; then pip install mysqlclient==1.3.14; fi
50ac0d3c50b9 support python 3.4 testing
John Rouillard <rouilj@ieee.org>
parents: 5920
diff changeset
128 - if [[ $TRAVIS_PYTHON_VERSION != "3.4"* ]]; then pip install mysqlclient; fi
7200
c878d24ea034 disable gpg for 2.7 https://issues.roundup-tracker.org/issue2551267 no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7199
diff changeset
129 # https://issues.roundup-tracker.org/issue2551267
c878d24ea034 disable gpg for 2.7 https://issues.roundup-tracker.org/issue2551267 no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7199
diff changeset
130 - if [[ $TRAVIS_PYTHON_VERSION == "3."* ]]; then pip install gpg; fi
8090
4d6c817f709b chore: install scandir on python 2
John Rouillard <rouilj@ieee.org>
parents: 7891
diff changeset
131 - if [[ $TRAVIS_PYTHON_VERSION == "2."* ]]; then pip install scandir; fi
6814
3f60a71b0812 Summary: Support selecion session/otk data store. Add redis as data store.
John Rouillard <rouilj@ieee.org>
parents: 6801
diff changeset
132 - pip install redis
7200
c878d24ea034 disable gpg for 2.7 https://issues.roundup-tracker.org/issue2551267 no-github-ci
John Rouillard <rouilj@ieee.org>
parents: 7199
diff changeset
133 - pip install pytz whoosh pyjwt requests
6714
c997a0dbd6bd add jinja2 module.
John Rouillard <rouilj@ieee.org>
parents: 6713
diff changeset
134 - pip install jinja2
8183
8c17d0def3f3 try loading psycopg2 for python 2
John Rouillard <rouilj@ieee.org>
parents: 8090
diff changeset
135 - pip install psycopg2
7823
5ac9253d2a5f test: add comment that ci tests don't need pytest-env.
John Rouillard <rouilj@ieee.org>
parents: 7742
diff changeset
136 # note pytest-env is not needed for redis password as there is
5ac9253d2a5f test: add comment that ci tests don't need pytest-env.
John Rouillard <rouilj@ieee.org>
parents: 7742
diff changeset
137 # no password on CI's redis.
7256
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
138 - pip install pytest-cov
6671
8e834d29e0e1 Add pip install of beautifulsoup4.
John Rouillard <rouilj@ieee.org>
parents: 6639
diff changeset
139 - pip install beautifulsoup4
6095
3ada6a3f48e1 fixed ReStructuredText encoding with Python 3
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5935
diff changeset
140 - if [[ $TRAVIS_PYTHON_VERSION != "3.4"* ]]; then pip install docutils; fi
6598
27a4ab499189 mistune 2 has been released so pin mistune to older 0.8.4 until we adopt 2.0 and remove include directive.
John Rouillard <rouilj@ieee.org>
parents: 6597
diff changeset
141 - if [[ $TRAVIS_PYTHON_VERSION != "3.4"* ]]; then pip install mistune==0.8.4; fi
6549
5ce92594cb27 Markdown 3.3.6 available does is fix the failure with 3.3.5?
John Rouillard <rouilj@ieee.org>
parents: 6540
diff changeset
142 - if [[ $TRAVIS_PYTHON_VERSION != "3.4"* && $TRAVIS_PYTHON_VERSION != "2."* ]]; then pip install Markdown; fi
7891
3de80157606c fix: revert markdown2 version limitation; markdown2 bug resolved
John Rouillard <rouilj@ieee.org>
parents: 7823
diff changeset
143 - pip install markdown2
7620
d849802989a2 chore(deps): brotli 1.1.0 breaks under python 2
John Rouillard <rouilj@ieee.org>
parents: 7513
diff changeset
144 - pip install brotli==1.0.9
6624
19897a7ef409 If install of zstd fails, don't abort the test run.
John Rouillard <rouilj@ieee.org>
parents: 6617
diff changeset
145 # zstd fails to build under python nightly aborting test.
19897a7ef409 If install of zstd fails, don't abort the test run.
John Rouillard <rouilj@ieee.org>
parents: 6617
diff changeset
146 # allow testing to still happen if the optional package doesn't install.
6625
a67692d50ede ignore zstd build failure trial 2.
John Rouillard <rouilj@ieee.org>
parents: 6624
diff changeset
147 - pip install zstd || true
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
148
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
149 before_script:
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
150 # set up mysql database
5641
1601968f01a1 Remove other python versions to reduce cycle time while trying to fix
John Rouillard <rouilj@ieee.org>
parents: 5640
diff changeset
151 - sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf
5640
a82c56a9c2a2 trying to fix OperationalError(2006) problem in travis
John Rouillard <rouilj@ieee.org>
parents: 5514
diff changeset
152 - cat /etc/mysql/my.cnf
5641
1601968f01a1 Remove other python versions to reduce cycle time while trying to fix
John Rouillard <rouilj@ieee.org>
parents: 5640
diff changeset
153 - sudo service mysql restart
6597
20632fdee6da try focal upgrade again. mysql user creation/grant updated
John Rouillard <rouilj@ieee.org>
parents: 6596
diff changeset
154 - mysql -u root -e 'CREATE USER "rounduptest"@"localhost" IDENTIFIED WITH mysql_native_password BY "rounduptest"; GRANT ALL on rounduptest.* TO "rounduptest"@"localhost";'
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
155
6614
e9dc8e526dd0 Remove fix for old mysql bug; try to improve postgresql perf
John Rouillard <rouilj@ieee.org>
parents: 6598
diff changeset
156 # Disable fsync for speed, don't care about data durability when testing
6615
36ccdf0eff8d Fix posgresql.conf change command. need sudo.
John Rouillard <rouilj@ieee.org>
parents: 6614
diff changeset
157 - sudo sed -i -e '$a\fsync = off' /etc/postgresql/*/*/postgresql.conf
5784
78de5419a0ec service name of postgresql not postgres??
John Rouillard <rouilj@ieee.org>
parents: 5783
diff changeset
158 - sudo service postgresql restart; sleep 30
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
159 # set up postgresql database
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
160 - psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres
7719
3071db43bfb6 feat: issue2550852 - support using a specified PostgreSQL db schema
John Rouillard <rouilj@ieee.org>
parents: 7669
diff changeset
161 - psql -c "CREATE ROLE rounduptest_schema LOGIN PASSWORD 'rounduptest';" -U postgres
7722
7e2552cc0b62 chore: split create db and grant to separate psql commands
John Rouillard <rouilj@ieee.org>
parents: 7720
diff changeset
162 - psql -c "CREATE DATABASE rounduptest_schema;" -U postgres
7e2552cc0b62 chore: split create db and grant to separate psql commands
John Rouillard <rouilj@ieee.org>
parents: 7720
diff changeset
163 - psql -c "GRANT CREATE ON DATABASE rounduptest_schema TO rounduptest_schema;" -U postgres
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
164
6480
0f0cee081990 Force test of a locale
John Rouillard <rouilj@ieee.org>
parents: 6458
diff changeset
165 # build the .mo translation files and install them into a tree
0f0cee081990 Force test of a locale
John Rouillard <rouilj@ieee.org>
parents: 6458
diff changeset
166 # (locale/locale under roundup directory root)
0f0cee081990 Force test of a locale
John Rouillard <rouilj@ieee.org>
parents: 6458
diff changeset
167 # suitable for use by gettext.
6485
685778e0a122 Only list one local locale file. Clean up log.
John Rouillard <rouilj@ieee.org>
parents: 6484
diff changeset
168 - (cd locale; make local_install; ls -lR locale/de/LC_MESSAGES)
6480
0f0cee081990 Force test of a locale
John Rouillard <rouilj@ieee.org>
parents: 6458
diff changeset
169
5003
a9e0ef739241 Add .travis.yml
John Kristensen <john@jerrykan.com>
parents:
diff changeset
170 script:
5500
3c61c771c8fb set PATH and LD_LIBRARY_PATH for tests
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5499
diff changeset
171 - PATH=$VIRTUAL_ENV/bin:$PATH
3c61c771c8fb set PATH and LD_LIBRARY_PATH for tests
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5499
diff changeset
172 - export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH
7451
ec5111fa3279 apparently the : was causing travis-ci to fail parsing of file.
John Rouillard <rouilj@ieee.org>
parents: 7450
diff changeset
173 - python -c "import sys; print('python version ', sys.version)"
7669
fa5c3c86bcf2 chore: fix after_success for travis. Did not run last commit.
John Rouillard <rouilj@ieee.org>
parents: 7623
diff changeset
174 - if [[ "$TRAVIS_PYTHON_VERSION" != "2."* ]]; then
7512
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
175 python -m pytest -r a \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
176 --durations=20 \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
177 -W default \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
178 -W "ignore:SelectableGroups:DeprecationWarning" \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
179 -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
180 -W "ignore:'U' mode::docutils.io" \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
181 -W "ignore:unclosed:ResourceWarning:roundup.roundup.demo" \
8d55398f976a See if this fixes nightly python run.
John Rouillard <rouilj@ieee.org>
parents: 7511
diff changeset
182 -W "ignore:unclosed file:ResourceWarning:enum" \
6800
3cfe6b0db01c stop after 5 failures. reduce spend of OSS credits on travisci.
John Rouillard <rouilj@ieee.org>
parents: 6760
diff changeset
183 -v --maxfail=5 test/ --cov=roundup;
6499
989e175ebc49 Let's try this.....
John Rouillard <rouilj@ieee.org>
parents: 6498
diff changeset
184 fi
989e175ebc49 Let's try this.....
John Rouillard <rouilj@ieee.org>
parents: 6498
diff changeset
185 - if [[ "$TRAVIS_PYTHON_VERSION" == "2."* ]]; then
7449
24e4bb7f2884 Try fixing syntax error.
John Rouillard <rouilj@ieee.org>
parents: 7448
diff changeset
186 python -m pytest -v -r a --maxfail=5 test/ --cov=roundup;
6499
989e175ebc49 Let's try this.....
John Rouillard <rouilj@ieee.org>
parents: 6498
diff changeset
187 fi
7742
b7a8d9664938 doc: fix build_docs test on travis and add to github ci
John Rouillard <rouilj@ieee.org>
parents: 7722
diff changeset
188 - python -m pip install sphinx-tabs
6615
36ccdf0eff8d Fix posgresql.conf change command. need sudo.
John Rouillard <rouilj@ieee.org>
parents: 6614
diff changeset
189 - ./setup.py build_doc
6496
13d9c0833b55 Disable wrning tests for python2.
John Rouillard <rouilj@ieee.org>
parents: 6495
diff changeset
190
5919
d789c28db503 issue2551025: try handling operational error exception in close #3
John Rouillard <rouilj@ieee.org>
parents: 5918
diff changeset
191 after_success:
7256
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
192 # from https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader
7669
fa5c3c86bcf2 chore: fix after_success for travis. Did not run last commit.
John Rouillard <rouilj@ieee.org>
parents: 7623
diff changeset
193 - curl https://keybase.io/codecovsecurity/pgp_keys.asc | \
7256
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
194 gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
195 - curl -Os https://uploader.codecov.io/latest/linux/codecov
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
196 - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
197 - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
198 - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
199 - shasum -a 256 -c codecov.SHA256SUM
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
200 - chmod +x codecov
426a40726f65 download codecov uploader for travis-ci
John Rouillard <rouilj@ieee.org>
parents: 7200
diff changeset
201 - ./codecov -t ${CODECOV_TOKEN}

Roundup Issue Tracker: http://roundup-tracker.org/