Skip to content

Commit

Permalink
circle config: drop virtualenv, manual python/venv install
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Jan 13, 2022
1 parent 081ec43 commit 6617b24
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
31 changes: 14 additions & 17 deletions .circleci/config.yml
Expand Up @@ -16,30 +16,27 @@ jobs:
- restore_cache:
key: venv-7-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}

# - run:
# name: Base dependencies
# command: |
# apt-get update
# apt-get install -y python3

- run:
name: Python 3 dependencies
name: Install dependencies
command: |
# apt-get install -y python3-venv python3-dev
python3 -m venv local3
. local3/bin/activate
# pip install -U pip
# pip install cython # avoids grpcio install bug (search _needs_stub)
which pip
pip -V
which pip3
pip3 -V
which python
python -V
which python3
python3 -V
pip install -U pip
pip install -U -r requirements.txt
pip install coverage coveralls
- run:
name: Test Python 3
name: Run tests
command: |
. local3/bin/activate
gcloud beta emulators datastore start --host-port=:8089 --no-store-on-disk --consistency=1.0 --quiet &
CLOUDSDK_CORE_PROJECT=granary-demo gcloud beta emulators datastore start --host-port=:8089 --no-store-on-disk --consistency=1.0 --quiet &
sleep 5s
python3 -m coverage run --source=. --omit=appengine_config.py,cron.py,granary/tests/\*,local3/\*,oauth-dropins/\*,old_apps/\*,setup.py,test_\*,\*_live_test.py -m unittest discover -v
python -m coverage run --source=. --omit=appengine_config.py,cron.py,granary/tests/\*,oauth-dropins/\*,old_apps/\*,setup.py,test_\*,\*_live_test.py -m unittest discover -v
kill %1
PYTHONPATH= python ./instagram_live_test.py --debug
python -m coverage html -d /tmp/coverage_html
Expand All @@ -48,7 +45,7 @@ jobs:
- save_cache:
key: venv-7-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
paths:
- "local3"
- "/usr/local/lib/python3.7/site-packages/"

- store_artifacts:
path: /tmp/coverage_html
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -9,6 +9,7 @@ flask~=2.0.2
flask-caching~=1.10.1
flask-gae-static
google-cloud-logging~=2.7.0
google-cloud-ndb~=1.2
gunicorn~=20.1
mox3~=1.1

Expand Down
1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -40,7 +40,6 @@
'beautifulsoup4~=4.8',
'brevity>=0.2.17',
'feedgen~=0.9',
'google-cloud-ndb~=1.2',
'html2text>=2019.8.11',
'humanfriendly>=4.18,<11.0',
'jinja2>=2.10,<4.0',
Expand Down

0 comments on commit 6617b24

Please sign in to comment.