start running tests on circleci

mastodon
Ryan Barrett 2017-08-18 07:42:16 -07:00
rodzic 51d0cfb872
commit 8554c16ad0
1 zmienionych plików z 30 dodań i 0 usunięć

30
circle.yml 100644
Wyświetl plik

@ -0,0 +1,30 @@
# CircleCI automatically reads this file from our repo and uses it for
# configuration. Docs: https://circleci.com/docs/configuration
checkout:
post:
# use granary and oauth-dropins master at head. (see pip install -e 's below.)
- cd /tmp; git clone https://github.com/snarfed/oauth-dropins.git
- cd /tmp/oauth-dropins; git submodule sync; git submodule update --init
- cd /tmp/oauth-dropins/oauth_dropins/webutil; git checkout master; git pull
- cd /tmp; git clone https://github.com/snarfed/granary.git
dependencies:
pre:
- sudo `which gcloud` -q components install app-engine-python app-engine-python-extras
- pip install -e /tmp/oauth-dropins/
- pip install -e /tmp/granary/
post:
- pip install coverage coveralls # for https://coveralls.io/
- ln -s $VIRTUAL_ENV local # we use app engine's vendor module to point here
machine:
environment:
PYTHONPATH: $PYTHONPATH:/opt/google-cloud-sdk/platform/google_appengine
COVERAGE_FILE: $CIRCLE_ARTIFACTS/.coverage
test:
override:
- python -m coverage run --source=. -m unittest discover -v
- python -m coverage html -d $CIRCLE_ARTIFACTS
post:
- if [ "$COVERALLS_REPO_TOKEN" != "" ]; then coveralls; fi