Skip to content

Commit

Permalink
Merge pull request #17 from BYU-AUVSI/travis
Browse files Browse the repository at this point in the history
#9 CI
  • Loading branch information
len0rd authored Jan 16, 2019
2 parents cddc00a + 38d6788 commit cd1ee78
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: python
sudo: required
dist: xenial
services: postgresql
before_script: # setup postgres db
- psql -f server/setup/internal/setup_database.sql -U postgres
python:
- "3.5"
- "3.6"
- "3.7"
# command to install dependencies
install:
- pip install -r server/setup/internal/server-pip-requirements.txt
# command to run tests
script:
- cd server/src && python test.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Imaging
# Imaging [![Build Status](https://travis-ci.com/BYU-AUVSI/imaging.png)](https://travis-ci.com/BYU-AUVSI/imaging)

This package contains all the code used by the imaging subsystem.

Expand Down
10 changes: 7 additions & 3 deletions server/src/test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env python
import unittest
import unittest, sys

if __name__ == "__main__":
def main():
suite = unittest.TestLoader().discover('.', pattern = "*_test.py")
unittest.TextTestRunner(verbosity=2).run(suite)
results = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(not results.wasSuccessful())

if __name__ == "__main__":
main()

0 comments on commit cd1ee78

Please sign in to comment.