Skip to content

Commit

Permalink
Add tests to Travis, fix lint script
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed Jun 7, 2017
1 parent 64098da commit 7513782
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@ language: python

python: "3.6"

dist: xenial
sudo: false
dist: trusty
sudo: required

matrix:
fast_finish: true

cache: pip

install: pip install --upgrade pycodestyle
services:
mysql

script: ./lint.sh --check
before_install:
- mysql -u root -e 'CREATE DATABASE nyaav2 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;'

install:
- pip install -r requirements.txt
- sed "s/mysql:\/\/test:test123@/mysql:\/\/root:@/" config.example.py > config.py
- python db_create.py
- ./db_migrate.py stamp head

script:
- python -m pytest tests/
- ./lint.sh --check

notifications:
email: false
2 changes: 2 additions & 0 deletions lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ if [[ ${action} == check_lint ]]; then
echo "The code requires some changes."
fi
fi

if [[ ${result} -ne 0 ]]; then exit 1; fi

0 comments on commit 7513782

Please sign in to comment.