Skip to content

Commit

Permalink
migrate from circle 1 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Mar 10, 2018
1 parent 2904f73 commit c571a3b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 34 deletions.
60 changes: 60 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,60 @@
# 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: circleci/python:2.7

environment:
- PYTHONPATH: /usr/lib/google-cloud-sdk/platform/google_appengine

steps:
- checkout

- restore_cache:
key: venv-{{ .Branch }}-{{ checksum "requirements.freeze.txt" }}

- run:
name: Install oauth-dropins and granary
command: |
# use oauth-dropins master at head. (see pip install -e below.)
cd /tmp
git clone https://github.com/snarfed/oauth-dropins.git
cd oauth-dropins; git submodule sync; git submodule update --init
cd oauth_dropins/webutil; git checkout master; git pull
- run:
name: Install dependencies
command: |
apt-get install google-cloud-sdk-app-engine-python-extras
pip install virtualenv
virtualenv local
. local/bin/activate
pip install -r requirements.freeze.txt
pip install -e /tmp/oauth-dropins/
pip install coverage coveralls # for https://coveralls.io/
- run:
name: Test
command: |
. local/bin/activate
python -m coverage run --source=. --omit=granary/test/\*,local/\*,oauth-dropins/\*,old_apps/\*,setup.py,test_\*,\*_live_test.py -m unittest discover -v
python -m coverage html -d /tmp/coverage_html
python ./instagram_live_test.py --debug
if [ "$COVERALLS_REPO_TOKEN" != "" ]; then coveralls; fi
- save_cache:
key: venv-{{ .Branch }}-{{ checksum "requirements.freeze.txt" }}
paths:
- "local"

- store_artifacts:
path: /tmp/coverage_html
30 changes: 0 additions & 30 deletions circle.yml

This file was deleted.

4 changes: 2 additions & 2 deletions requirements.freeze.txt
@@ -1,5 +1,5 @@
beautifulsoup4==4.4.1
brevity==0.2.14
brevity==0.2.16
certifi==2017.7.27.1
chardet==3.0.4
coverage==4.0.3
Expand All @@ -15,7 +15,7 @@ MarkupSafe==1.0
mf2py==1.0.5
-e git+https://github.com/snarfed/mf2util.git@992b2655be66a128bb40f847f3eba0ed955cadfe#egg=mf2util
mox==0.5.3
-e git+git@github.com:snarfed/oauth-dropins.git@0de5f2da6fbf345ceea262d23f9e40576e6ce7db#egg=oauth_dropins
-e git+git@github.com:snarfed/oauth-dropins.git@v1.11#egg=oauth_dropins
oauth2client==4.1.2
oauthlib==2.0.2
pyasn1==0.3.3
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -7,5 +7,5 @@ mf2util>=0.5.0
oauth-dropins>=1.11
requests>=2.10.0
requests-toolbelt>=0.6.2
brevity>=0.2.14
brevity>=0.2.16
urllib3>=1.14
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -47,7 +47,7 @@ def __init__(self, *args, **kwargs):
'oauth-dropins>=1.11',
'requests>=2.10.0',
'requests-toolbelt>=0.6.2',
'brevity>=0.2.14',
'brevity>=0.2.16',
'urllib3>=1.14',
],
extras_require={
Expand Down

0 comments on commit c571a3b

Please sign in to comment.