kopia lustrzana https://github.com/snarfed/bridgy-fed
49 wiersze
1.5 KiB
YAML
49 wiersze
1.5 KiB
YAML
# CircleCI automatically reads this file from our repo and uses it for
|
|
# configuration. Docs:
|
|
# https://circleci.com/docs/2.0/configuration-reference/
|
|
# https://circleci.com/docs/2.0/sample-config/
|
|
version: 2
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
# https://circleci.com/docs/2.0/google-container-engine/#selecting-a-base-image
|
|
- image: google/cloud-sdk
|
|
- image: python:2.7.12
|
|
|
|
environment:
|
|
- PYTHONPATH: /usr/lib/google-cloud-sdk/platform/google_appengine
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
key: venv-{{ .Branch }}-{{ checksum "requirements.freeze.txt" }}
|
|
|
|
- run:
|
|
name: Python 2 dependencies
|
|
command: |
|
|
apt-get install -y python-virtualenv google-cloud-sdk-app-engine-python-extras
|
|
virtualenv --python=python2 local
|
|
. local/bin/activate
|
|
pip install -r requirements.freeze.txt
|
|
pip install coverage coveralls # for https://coveralls.io/
|
|
|
|
- run:
|
|
name: Build and test
|
|
command: |
|
|
. local/bin/activate
|
|
python2 -m coverage run --source=. --omit=appengine_config.py,local/\*,oauth-dropins/\*,tests/\* -m unittest discover -v
|
|
python2 -m coverage html -d /tmp/coverage_html
|
|
|
|
# send coverage data to coveralls
|
|
if [ "$COVERALLS_REPO_TOKEN" != "" ]; then coveralls || true; fi
|
|
|
|
- save_cache:
|
|
key: venv-{{ .Branch }}-{{ checksum "requirements.freeze.txt" }}
|
|
paths:
|
|
- local
|
|
|
|
- store_artifacts:
|
|
path: /tmp/coverage_html
|