1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

New integration tests using webrecorder-tests: (#355)

New integration tests using webrecorder-tests:
- WR_TEST=true is set for integration test run (only run with py3.6, excluded for py2.7, 3.5)
- Added .travis directory that includes two scripts: install.sh and test.sh.
- install.sh handles all installation and test.sh handles running of unit or integration tests
- sudo: true required to run headless chrome
This commit is contained in:
John Berlin 2018-07-09 16:21:14 -04:00 committed by Ilya Kreymer
parent 3e7ec05cfe
commit 2f062cf5c7
3 changed files with 45 additions and 10 deletions

View File

@ -8,6 +8,16 @@ python:
os:
- linux
addons:
apt:
packages:
# This is required to run new chrome on old trusty
- libnss3
env:
- WR_TEST=no
- WR_TEST=yes
addons:
sauce_connect: true
@ -16,25 +26,25 @@ cache:
- $HOME/.cache/pip
- node_modules
sudo: false
sudo: true
install:
#- pip install boto certauth youtube-dl
#- pip install git+https://github.com/esnme/ultrajson.git
- python setup.py -q install
- pip install -r extra_requirements.txt
- pip install coverage pytest-cov coveralls
- pip install codecov
- npm install
- ./.travis/install.sh
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- python setup.py test
- cd karma-tests && make test && cd ..
- ./.travis/test.sh
after_success:
- codecov
matrix:
exclude:
- env: WR_TEST=yes
python: "2.7"
- env: WR_TEST=yes
python: "3.5"

15
.travis/install.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
python setup.py -q install
pip install -r extra_requirements.txt
pip install coverage pytest-cov coveralls
pip install codecov
npm install
if [ "$WR_TEST" = "yes" ]; then
git clone https://github.com/webrecorder/webrecorder-tests.git
cd webrecorder-tests
pip install --upgrade -r requirements.txt
./bootstrap.sh
fi

10
.travis/test.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
if [ "$WR_TEST" = "no" ]; then
python setup.py test
cd karma-tests && make test && cd ..
else
cd webrecorder-tests
INTRAVIS=1 pytest -m "pywbtest"
fi