forked from repology/repology-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (61 loc) · 2.38 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
language: python
sudo: true
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
- postgresql-server-dev-10
- librpm-dev
env:
global:
- PGPORT=5433
- REPOLOGY_CONFIG=repology-test.conf.default
python:
- 3.6
before_install:
- pip install Jinja2
- pip install PyYAML
- pip install coveralls
- pip install flake8
- pip install 'flake8-builtins!=1.1.0'
- pip install flake8-import-order
- pip install flake8-quotes
- pip install flask
- pip install lxml
- pip install pillow
- pip install psycopg2
- pip install pytidylib # uses newer libtidy installed below
- pip install requests
- pip install rubymarshal
- pip install voluptuous
- pip install pytz
- wget -qO- https://github.com/repology/libversion/archive/master.tar.gz | tar -xzf- && ( cd libversion-master && cmake . && make && sudo make install && sudo ldconfig )
- pip install libversion
- wget -qO- https://github.com/htacg/tidy-html5/archive/master.tar.gz | tar -xzf- && ( cd tidy-html5-master && cmake . && make && sudo make install && sudo ldconfig )
- wget -qO- https://github.com/repology/postgresql-libversion/archive/master.tar.gz | tar -xzf- && ( cd postgresql-libversion-master && sudo make install )
- git clone --depth=1 https://github.com/repology/repology-rules.git rules.d
before_script:
- sudo -u postgres psql -c "CREATE DATABASE repology_test;"
- sudo -u postgres psql -c "CREATE USER repology_test WITH PASSWORD 'repology_test'"
- sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE repology_test TO repology_test"
- sudo -u postgres psql -d repology_test -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
- sudo -u postgres psql -d repology_test -c "CREATE EXTENSION IF NOT EXISTS libversion"
- echo "BADGE_FONT = '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf'" >> repology-test.conf.default
- sed -i -e 's|dbname=repology_test|& port=5433 host=localhost|' repology-test.conf.default
script:
# test building C utils
- make
# check yaml schemas
- make check
# check python syntax
- make flake8
# fill database with test data
- ./repology-update.py --parse --initdb --database --no-safety-checks
# smoke test bit
- ./repology-dump.py --help
# run unit tests with coverage
- coverage run --source="repology,repology-app" --omit="repology/fetchers/*" -m unittest discover
after_success:
- coveralls