forked from repology/repology-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (50 loc) · 1.66 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
language: python
sudo: true
dist: trusty
services:
- postgresql
addons:
postgresql: "9.6"
python:
- 3.6
before_install:
- pip install Jinja2
- pip install PyYAML
- pip install coveralls
- pip install flake8
- pip install flake8-builtins
- pip install flake8-import-order
- pip install flake8-quotes
- pip install flask
- pip install lxml
- pip install psycopg2
- pip install pytidylib # uses newer libtidy installed below
- pip install requests
- pip install rubymarshal
- pip install voluptuous
- sudo apt-get update -qq
- sudo apt-get install -qq librpm-dev
- wget -qO- https://github.com/repology/libversion/archive/1.2.0.tar.gz | tar -xzf- && ( cd libversion-1.2.0 && cmake . && make && sudo make install )
- git clone --depth=1 https://github.com/htacg/tidy-html5.git && ( cd tidy-html5 && cmake . && make && sudo make install )
- sudo ldconfig
before_script:
- psql -U postgres -c "CREATE DATABASE repology_test;"
- psql -U postgres -c "CREATE USER repology_test WITH PASSWORD 'repology_test'"
- psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE repology_test TO repology_test"
- psql -U postgres -d repology_test -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
- export REPOLOGY_CONFIG=repology-test.conf.default
script:
# test buidling C utils
- make
# check yaml schemas
- make check
# check python syntax
- make flake8
# fill database with test data
- ./repology-update.py --parse --initdb --database
# 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