Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
aef2be4
[WIP] CI shuffle.
Mar 7, 2017
1a81c51
Potential CI strategy in progress.
Mar 8, 2017
c3fc0a2
Move system test utils to test_utils
Mar 8, 2017
a287c6b
Migrate from tox to nox.
Mar 8, 2017
025a6d6
Oops
Mar 8, 2017
38c780f
More updates
Mar 8, 2017
7553dc4
Order nox sessions.
Mar 8, 2017
c2fa5d0
Move logging to new structure/testing.
Mar 8, 2017
13ae7e4
Convert BigQuery to new CI structure.
Mar 9, 2017
72fa1ee
Migrating BigTable to new CI.
Mar 9, 2017
3840dd9
Migrating datastore to new CI.
Mar 9, 2017
84b19bc
Migrating DNS to new CI.
Mar 9, 2017
9b596c5
Migrating error reporting to new CI.
Mar 9, 2017
39d491a
Migrating monitoring to new CI.
Mar 9, 2017
11355d5
Migrating PubSub to new CI.
Mar 9, 2017
f4eb0dd
Migrating Resource Manager to new CI.
Mar 9, 2017
a655237
Migrating runtimeconfig to new CI.
Mar 9, 2017
5d0136e
Migrating Spanner to new CI.
Mar 9, 2017
f8ca737
Migrating Speech to new CI.
Mar 9, 2017
aa66ea7
Migrating storage to new CI.
Mar 9, 2017
3b35254
Migrating Translate to new CI.
Mar 9, 2017
7bd9ad5
Migrate Vision to new CI.
Mar 9, 2017
0e8e42f
Finish migrating core to new CI.
Mar 10, 2017
b25a2ad
Updating nox files; moving to CircleCI 2.0.
Mar 10, 2017
58edd3d
Building docs, private GitHub push.
Mar 14, 2017
4f06cbd
Switch to custom Docker image.
Mar 15, 2017
7d430d4
Make APIs separate steps.
Mar 15, 2017
568b8cb
Install openssl. Move this into the Docker image.
Mar 15, 2017
bc64da4
Re-add @dhermes release code at the end.
Mar 15, 2017
86f36ef
Bumping logging to top temporarily since it is my problem child.
Mar 15, 2017
a883e70
Various system text fixes.
Mar 17, 2017
aafd66e
Attempting an AppVeyor build.
Mar 17, 2017
a9c4ba9
Stop trying to build on Travis.
Mar 17, 2017
68e7b34
Make the speech wait even more permissive.
Mar 17, 2017
ec54195
Changing a single Noxfile to see what Appveyor does.
Mar 17, 2017
175ad31
Merge branch 'public-master' into ci
Mar 17, 2017
d60b315
Reverting 'noxfile.py' change, did not work in AppVeyor.
Mar 20, 2017
8d1db7b
Add from __future__ import absolute_import to noxfiles.
Mar 20, 2017
2fe224b
Remove top-level nox.py in AppVeyor.
Mar 20, 2017
8d17bf4
Typo
Mar 20, 2017
7e15714
Potentially clever AppVeyor solution.
Mar 20, 2017
226b16a
Typo
Mar 20, 2017
59e3589
Merge branch 'public-master' into ci
Mar 21, 2017
33eb251
Testing a nox build that might handle interpreters on Windows.
Mar 21, 2017
9d832f5
Use backslashes for AppVeyor.
Mar 21, 2017
ef21582
Turns out just one backslash.
Mar 21, 2017
7a68b1e
AppVeyor is annoying.
Mar 21, 2017
6740425
AppVeyor, still annoying.
lukesneeringer Mar 21, 2017
d96b0e1
Absolute paths are the answer, apparently.
lukesneeringer Mar 21, 2017
d8f13ad
Merge branch 'public-master' into ci
Mar 22, 2017
23c4f26
Bump nox to 0.11.0
Mar 22, 2017
9cf2fe0
Bump nox to 0.11.1
Mar 22, 2017
a15be70
Fix packaging of tests and resources (#3185)
Mar 23, 2017
0dcea11
Merge branch 'ci' of github.com:GoogleCloudPlatform/google-cloud-pyth…
Mar 23, 2017
3987bcb
Remove explicit chdir; use nox from branch.
Mar 23, 2017
e9c8338
Move new BigQuery test data into BigQuery.
Mar 23, 2017
46273f8
Merge branch 'public-master' into ci
Mar 23, 2017
8e21c20
nox 0.11.2
Mar 23, 2017
2a43437
Remove terrible .exe copy that I tried earlier.
Mar 23, 2017
2510a7d
Merge branch 'public-master' into ci
Mar 23, 2017
58d1081
Merge branch 'public-master' into ci
Mar 23, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
142 changes: 142 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
version: 2
jobs:
build:
docker:
- image: googleapis/nox:0.11.2
steps:
- checkout
- run:
name: Decrypt credentials
command: |
if [ -n "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
apt-get update && apt-get install -y openssl
openssl aes-256-cbc -d -a -k "$GOOGLE_CREDENTIALS_PASSPHRASE" \
-in /var/code/gcp/test_utils/credentials.json.enc \
-out "$GOOGLE_APPLICATION_CREDENTIALS"
else
echo "No credentials. System tests will not run."
fi
- run:
name: Add GitHub public key to known hosts
command: |
mkdir -p ~/.ssh/
if [[ ! -f ~/.ssh/known_hosts ]] || ! grep "github.com" ~/.ssh/known_hosts; then
echo "
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
" >> ~/.ssh/known_hosts
fi
- run:
name: Declare target packages (changed packages and dependencies).
command: |
python3.6 test_utils/scripts/get_target_packages.py > ~/target_packages
cat ~/target_packages
- run:
name: Run tests - google.cloud.core
command: |
if [[ -n $(grep core ~/target_packages) ]]; then
nox -f core/nox.py
fi
- run:
name: Run tests - google.cloud.bigquery
command: |
if [[ -n $(grep bigquery ~/target_packages) ]]; then
nox -f bigquery/nox.py
fi
- run:
name: Run tests - google.cloud.bigtable
command: |
if [[ -n $(grep bigtable ~/target_packages) ]]; then
nox -f bigtable/nox.py
fi
- run:
name: Run tests - google.cloud.datastore
command: |
if [[ -n $(grep datastore ~/target_packages) ]]; then
nox -f datastore/nox.py
fi
- run:
name: Run tests - google.cloud.dns
command: |
if [[ -n $(grep dns ~/target_packages) ]]; then
nox -f dns/nox.py
fi
- run:
name: Run tests - google.cloud.error_reporting
command: |
if [[ -n $(grep error_reporting ~/target_packages) ]]; then
nox -f error_reporting/nox.py
fi
- run:
name: Run tests - google.cloud.language
command: |
if [[ -n $(grep language ~/target_packages) ]]; then
nox -f language/nox.py
fi
- run:
name: Run tests - google.cloud.logging
command: |
if [[ -n $(grep logging ~/target_packages) ]]; then
nox -f logging/nox.py
fi
- run:
name: Run tests - google.cloud.monitoring
command: |
if [[ -n $(grep monitoring ~/target_packages) ]]; then
nox -f monitoring/nox.py
fi
- run:
name: Run tests - google.cloud.pubsub
command: |
if [[ -n $(grep pubsub ~/target_packages) ]]; then
nox -f pubsub/nox.py
fi
- run:
name: Run tests - google.cloud.resource_manager
command: |
if [[ -n $(grep resource_manager ~/target_packages) ]]; then
nox -f resource_manager/nox.py
fi
- run:
name: Run tests - google.cloud.runtimeconfig
command: |
if [[ -n $(grep runtimeconfig ~/target_packages) ]]; then
nox -f runtimeconfig/nox.py
fi
- run:
name: Run tests - google.cloud.spanner
command: |
if [[ -n $(grep spanner ~/target_packages) ]]; then
nox -f spanner/nox.py
fi
- run:
name: Run tests - google.cloud.speech
command: |
if [[ -n $(grep speech ~/target_packages) ]]; then
nox -f speech/nox.py
fi
- run:
name: Run tests - google.cloud.storage
command: |
if [[ -n $(grep storage ~/target_packages) ]]; then
nox -f storage/nox.py
fi
- run:
name: Run tests - google.cloud.translate
command: |
if [[ -n $(grep translate ~/target_packages) ]]; then
nox -f translate/nox.py
fi
- run:
name: Run tests - google.cloud.vision
command: |
if [[ -n $(grep vision ~/target_packages) ]]; then
nox -f vision/nox.py
fi
- deploy:
name: Update the docs
command: nox -e docs
- deploy:
name: Push to PyPI (if this is a release tag).
command: test_utils/scripts/circleci/twine_upload.sh
working_directory: /var/code/gcp/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pip-log.txt

# Unit test / coverage reports
.coverage
.nox
.tox
.cache

Expand Down
35 changes: 6 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
language: python
sudo: false

addons:
apt:
sources:
- deadsnakes
packages:
- python3.5

install:
- pip install --upgrade pip tox

script:
- python2.7 scripts/run_unit_tests.py
- if [[ "${TRAVIS_EVENT_TYPE}" != "pull_request" ]]; then python3.4 scripts/run_unit_tests.py; fi
- python3.5 scripts/run_unit_tests.py
- python scripts/run_unit_tests.py --tox-env cover
- tox -e lint
- tox -e system-tests
- tox -e system-tests3
- scripts/update_docs.sh

after_success:
- scripts/coveralls.sh

cache:
directories:
- ${HOME}/.cache/pip
---
# Exclude Travis completely.
# We can remove this file post-merge.
branches:
exclude:
- /.*/
41 changes: 36 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ environment:
# iterations.

# Python 2.7.11 is the latest Python 2.7 with a Windows installer
# Python 2.7.11 is the overall latest
# Python 2.7.13 is the overall latest
# https://www.python.org/ftp/python/2.7.11/
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.11"
PYTHON_MAJMIN_VERSION: "2.7"
PYTHON_ARCH: "32"
TOX_ENV: "py27"
NOX_ENV: "unit_tests(python_version='2.7')"

# Python 3.5.1 is the latest Python 3.5 with a Windows installer
# Python 3.5.1 is the overall latest
# Python 3.5.3 is the overall latest
# https://www.python.org/ftp/python/3.5.1/
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.1"
PYTHON_MAJMIN_VERSION: "3.5"
PYTHON_ARCH: "64"
TOX_ENV: "py35"
NOX_ENV: "unit_tests(python_version='3.5')"

install:
- ECHO "Filesystem root:"
Expand Down Expand Up @@ -69,8 +71,37 @@ build_script:

test_script:
- "%CMD_IN_ENV% pip list"

# AppVeyor gets confused by a nox.py file in the root, and tries to
# import from it instead of importing actual nox.
#
# This is an annoying problem, but we do not need to build docs here,
# so this is a hack-solution to get around it. I am okay with this in the
# short term because docs will move into their own packages soon, and this
# file will disappear completely.
- '%CMD_IN_ENV% del nox.py'

- '%CMD_IN_ENV% dir'
- '%CMD_IN_ENV% dir bigquery'

# Run the project tests
- "%CMD_IN_ENV% tox -e %TOX_ENV%"
- '%CMD_IN_ENV% nox -f bigquery\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f bigtable\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f core\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f datastore\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f dns\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f error_reporting\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f language\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f logging\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f monitoring\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f pubsub\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f resource_manager\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f runtimeconfig\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f spanner\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f speech\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f storage\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f translate\nox.py -e "%NOX_ENV%"'
- '%CMD_IN_ENV% nox -f vision\nox.py -e "%NOX_ENV%"'

after_test:
# If tests are successful, create binary packages for the project.
Expand Down
2 changes: 1 addition & 1 deletion appveyor/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
wheel
tox
nox-automation==0.11.2
6 changes: 6 additions & 0 deletions bigquery/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude =
__pycache__,
.git,
*.pyc,
conf.py
Loading