forked from ArchiveTeam/ArchiveBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (56 loc) · 2.48 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
# Multi language is not supported so Python needs to be installed ourselves.
# Ruby is default.
language: ruby
rvm:
- 2.2.3
env:
- PYTHON=python3.5
- PYTHON=python3.6
#notifications:
# irc:
# - "irc.efnet.net#archivebot"
before_install:
- sudo add-apt-repository ppa:deadsnakes/ppa --yes
- sudo apt-get update -qq
# The current version of pip no longer supports Python 3.5 since 2021-01-23, so get the specific version instead.
- |
if [[ "${PYTHON}" == "python3.5" ]]; then
GETPIPURL=https://bootstrap.pypa.io/pip/3.5/get-pip.py
else
GETPIPURL=https://bootstrap.pypa.io/get-pip.py
fi
- wget "${GETPIPURL}"
install:
- bundle install --jobs=3 --retry=3 --deployment
- cd plumbing && bundle install --jobs=3 --retry=3 --deployment && cd ..
- sudo apt-get -qq install ircd-hybrid $PYTHON $PYTHON-dev rsync libzmq3-dev
- /usr/bin/$PYTHON get-pip.py --user
- travis_retry /usr/bin/$PYTHON -m pip install -r pipeline/requirements.txt --user
- travis_retry /usr/bin/$PYTHON -m pip install nose pytest irc --user
- sudo cp test/example_rsyncd.conf /etc/rsyncd.conf
- /usr/bin/$PYTHON -m pip install git+https://github.com/chfoo/huhhttp#egg=huhhttp --user
before_script:
- curl -X PUT http://127.0.0.1:5984/archivebot
- curl -X PUT http://127.0.0.1:5984/archivebot_logs
- grep -v _rev db/design_docs/archive_urls.json > /tmp/archive_urls.json
- curl -X PUT http://127.0.0.1:5984/archivebot/_design/archive_urls -d @/tmp/archive_urls.json
- grep -v _rev db/design_docs/ignore_patterns.json > /tmp/ignore_patterns.json
- curl -X PUT http://127.0.0.1:5984/archivebot/_design/ignore_patterns -d @/tmp/ignore_patterns.json
- grep -v _rev db/design_docs/jobs.json > /tmp/jobs.json
- curl -X PUT http://127.0.0.1:5984/archivebot/_design/jobs -d @/tmp/jobs.json
- grep -v _rev db/design_docs/user_agents.json > /tmp/user_agents.json
- curl -X PUT http://127.0.0.1:5984/archivebot/_design/user_agents -d @/tmp/user_agents.json
# If ircd-hybrid is running (which currently happens with Ubuntu packages),
# this will restart it.
# If ircd-hybrid is not running (could happen in future), this will start it.
- sudo /etc/init.d/ircd-hybrid restart
- echo -e '\n\nRSYNC_ENABLE=true\n\n' | sudo tee -a /etc/default/rsync
- sudo /etc/init.d/rsync restart
services:
- redis-server
- couchdb
script:
- bundle exec rake
- /usr/bin/$PYTHON -m nose pipeline/
- /usr/bin/$PYTHON -m pytest test/validate_db.py
- /usr/bin/$PYTHON test/integration_runner.py