forked from LMFDB/lmfdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
123 lines (111 loc) · 5.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
os: linux
dist: xenial
env:
- SAGE_VERSION=9.1 TESTFILES="lmfdb/number_fields/test_numberfield.py lmfdb/bianchi_modular_forms/test_bmf.py lmfdb/abvar/fq/test_av.py lmfdb/abvar/fq/test_browse_page.py lmfdb/galois_groups/test_galoisgroup.py lmfdb/siegel_modular_forms/test_siegel_modular_forms.py lmfdb/genus2_curves/test_genus2_curves.py" #7
- SAGE_VERSION=9.1 TESTFILES="lmfdb/lfunctions/test_lfunctions.py lmfdb/tests/test_dynamic_knowls.py lmfdb/tests/test_root.py lmfdb/hecke_algebras/test_hecke_algebras.py lmfdb/elliptic_curves/test_ell_curves.py lmfdb/elliptic_curves/test_browse_page.py lmfdb/tests/test_homepage.py" #7
- SAGE_VERSION=9.1 TESTFILES="lmfdb/classical_modular_forms/test_cmf.py lmfdb/sato_tate_groups/test_st.py lmfdb/hilbert_modular_forms/test_hmf.py lmfdb/tests/test_spelling.py lmfdb/tests/test_template_namespace.py lmfdb/tests/test_acknowlegments.py lmfdb/tests/test_tensor_products.py" #7
- SAGE_VERSION=9.1 TESTFILES="lmfdb/local_fields/test_localfields.py lmfdb/users/test_users.py lmfdb/artin_representations/test_artin_representation.py lmfdb/ecnf/test_ecnf.py lmfdb/ecnf/test_isog_class.py lmfdb/api/test_api.py lmfdb/characters/test_characters.py" #7
- SAGE_VERSION=9.1 TESTFILES="lmfdb/lfunctions/test_lfunction_degree_2.py lmfdb/lattice/test_lattice.py lmfdb/maass_forms/test_maass.py lmfdb/higher_genus_w_automorphisms/test_hgcwa.py lmfdb/belyi/test_belyi.py lmfdb/tests/test_utils.py" #6
# 4*7 + 6 + test_workshoplinks.py + test_external.py = 36 total number of test files
# blocklist
branches:
except:
- web
- dev
addons:
apt:
packages:
# needed for sage
- binutils
- gcc
- g++
- gfortran
- make
- perl
- tar
- git
- openssl
- libssl-dev
# needed for pyflakes
- python3-pip
# needed for coveralls
- python-pip
# to run nosetests in parallel
- parallel
# update wget
- wget
install:
- lsb_release -a
# fix expired certs
- sudo sed -i 's|mozilla/AddTrust_External_Root.crt|!mozilla/AddTrust_External_Root.crt|g' /etc/ca-certificates.conf
- sudo update-ca-certificates
# number of cpus
- python -c "import multiprocessing;print(multiprocessing.cpu_count())"
- export jobs=$(python -c "import multiprocessing;print(2*multiprocessing.cpu_count())")
# assert parallel
- parallel --version
# install the latest pyflakes
- pip3 install pyflakes --user
# install a version of pylint having --py3k
- pip2 install pylint --user
# install the latest coveralls
- pip install coveralls --user
- export PATH=${HOME}/.local/bin/:${PATH}
# install SAGE with GAP already built in
# see: https://github.com/edgarcosta/binary-pkg
# - export SAGE_VERSION=8.8 # this is now set in env above
- echo $SAGE_VERSION
- export SAGE_DIR=${HOME}/SageMath
- export SAGE="${SAGE_DIR}/sage"
- export SAGE_INSTALL_GCC=no
- export MAKE='make -j4'
# what is the load on the server
- uptime
#- wget --no-verbose http://grace.mit.edu/sage-lmfdb/sage-${SAGE_VERSION}-Ubuntu_14.04-x86_64.tar.bz2
- wget --progress=dot:giga https://math.mit.edu/~edgarc/sage-${SAGE_VERSION}-Ubuntu_14.04-x86_64.tar.bz2
# what is the load on the server
- uptime
# travis_wait extends the default 10 minute timeout to 40 minutes
- travis_wait 40 time tar xf sage-${SAGE_VERSION}-Ubuntu_14.04-x86_64.tar.bz2 -C ${HOME}
# trigger the patch once script
- ${SAGE} --version > patch_once_log
# assert that we have GAP
- ${SAGE} -python -c 'from sage.all import gap;G = gap.TransitiveGroup(9, 2); print(G)'
# install LMFDB requirements
- ${SAGE} -pip install -r requirements.txt
- echo ${TESTFILES} | tr ' ' '\n' > inputfile
- cat inputfile
before_script:
# assert that devmirror.lmfdb.xyz accepts our connections
- nc -vz devmirror.lmfdb.xyz 5432
# how much free ram do we have
- free -m
# what is the load on the server
- uptime
# check that we travis isn't missing any test_ file
- test $(find lmfdb -name 'test_*.py' | wc -l) -eq 37
# Check that pytest is installed
- ${SAGE} -sh -c "pytest --version"
# Do a naive test to initialize the config file
- ${SAGE} -sh -c 'pytest lmfdb/tests/test_spelling.py'
script:
# run pyflakes
- pyflakes . > pyflakeslog
- if [[ $(wc -l < pyflakeslog) != 0 ]]; then echo "ERROR pyflakes failed!"; cat pyflakeslog; else echo "PASS pyflakes is happy!"; fi
# run pylint --py3k (with some temporary exceptions)
- pylint --py3k --score=no -d W1618,W1619,W1633,W1653 lmfdb/ > pylintlog
- if [[ $(wc -l < pylintlog) != 0 ]]; then echo "ERROR pylint failed!"; cat pylintlog; else echo "PASS pylint is happy!"; fi
# This runs without fail
- travis_wait 20 ${SAGE} -sh -c 'parallel -j ${jobs} --joblog joblog -a inputfile pytest --verbose -s' # to reenable coverage add --cov=lmfdb
after_failure:
# what is the load on the server
- uptime
- if [[ $(wc -l < pyflakeslog) != 0 ]]; then echo "ERROR pyflakes failed!"; cat pyflakeslog; else echo "PASS pyflakes is happy!"; fi
- if [[ $(wc -l < pylintlog) != 0 ]]; then echo "ERROR pylint failed!"; cat pylintlog; else echo "PASS pylint is happy!"; fi
after_success:
# show joblog
- cat joblog
# what is the load on the server
- uptime
# #- COVERALLS_PARALLEL=true coveralls
# - coveralls