Skip to content

Commit 9baade9

Browse files
CI Rehash (googleapis#3146)
1 parent 7561e15 commit 9baade9

File tree

365 files changed

+5810
-4151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+5810
-4151
lines changed

.circleci/config.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
version: 2
3+
jobs:
4+
build:
5+
docker:
6+
- image: googleapis/nox:0.11.2
7+
steps:
8+
- checkout
9+
- run:
10+
name: Decrypt credentials
11+
command: |
12+
if [ -n "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
13+
apt-get update && apt-get install -y openssl
14+
openssl aes-256-cbc -d -a -k "$GOOGLE_CREDENTIALS_PASSPHRASE" \
15+
-in /var/code/gcp/test_utils/credentials.json.enc \
16+
-out "$GOOGLE_APPLICATION_CREDENTIALS"
17+
else
18+
echo "No credentials. System tests will not run."
19+
fi
20+
- run:
21+
name: Add GitHub public key to known hosts
22+
command: |
23+
mkdir -p ~/.ssh/
24+
if [[ ! -f ~/.ssh/known_hosts ]] || ! grep "github.com" ~/.ssh/known_hosts; then
25+
echo "
26+
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
27+
" >> ~/.ssh/known_hosts
28+
fi
29+
- run:
30+
name: Declare target packages (changed packages and dependencies).
31+
command: |
32+
python3.6 test_utils/scripts/get_target_packages.py > ~/target_packages
33+
cat ~/target_packages
34+
- run:
35+
name: Run tests - google.cloud.core
36+
command: |
37+
if [[ -n $(grep core ~/target_packages) ]]; then
38+
nox -f core/nox.py
39+
fi
40+
- run:
41+
name: Run tests - google.cloud.bigquery
42+
command: |
43+
if [[ -n $(grep bigquery ~/target_packages) ]]; then
44+
nox -f bigquery/nox.py
45+
fi
46+
- run:
47+
name: Run tests - google.cloud.bigtable
48+
command: |
49+
if [[ -n $(grep bigtable ~/target_packages) ]]; then
50+
nox -f bigtable/nox.py
51+
fi
52+
- run:
53+
name: Run tests - google.cloud.datastore
54+
command: |
55+
if [[ -n $(grep datastore ~/target_packages) ]]; then
56+
nox -f datastore/nox.py
57+
fi
58+
- run:
59+
name: Run tests - google.cloud.dns
60+
command: |
61+
if [[ -n $(grep dns ~/target_packages) ]]; then
62+
nox -f dns/nox.py
63+
fi
64+
- run:
65+
name: Run tests - google.cloud.error_reporting
66+
command: |
67+
if [[ -n $(grep error_reporting ~/target_packages) ]]; then
68+
nox -f error_reporting/nox.py
69+
fi
70+
- run:
71+
name: Run tests - google.cloud.language
72+
command: |
73+
if [[ -n $(grep language ~/target_packages) ]]; then
74+
nox -f language/nox.py
75+
fi
76+
- run:
77+
name: Run tests - google.cloud.logging
78+
command: |
79+
if [[ -n $(grep logging ~/target_packages) ]]; then
80+
nox -f logging/nox.py
81+
fi
82+
- run:
83+
name: Run tests - google.cloud.monitoring
84+
command: |
85+
if [[ -n $(grep monitoring ~/target_packages) ]]; then
86+
nox -f monitoring/nox.py
87+
fi
88+
- run:
89+
name: Run tests - google.cloud.pubsub
90+
command: |
91+
if [[ -n $(grep pubsub ~/target_packages) ]]; then
92+
nox -f pubsub/nox.py
93+
fi
94+
- run:
95+
name: Run tests - google.cloud.resource_manager
96+
command: |
97+
if [[ -n $(grep resource_manager ~/target_packages) ]]; then
98+
nox -f resource_manager/nox.py
99+
fi
100+
- run:
101+
name: Run tests - google.cloud.runtimeconfig
102+
command: |
103+
if [[ -n $(grep runtimeconfig ~/target_packages) ]]; then
104+
nox -f runtimeconfig/nox.py
105+
fi
106+
- run:
107+
name: Run tests - google.cloud.spanner
108+
command: |
109+
if [[ -n $(grep spanner ~/target_packages) ]]; then
110+
nox -f spanner/nox.py
111+
fi
112+
- run:
113+
name: Run tests - google.cloud.speech
114+
command: |
115+
if [[ -n $(grep speech ~/target_packages) ]]; then
116+
nox -f speech/nox.py
117+
fi
118+
- run:
119+
name: Run tests - google.cloud.storage
120+
command: |
121+
if [[ -n $(grep storage ~/target_packages) ]]; then
122+
nox -f storage/nox.py
123+
fi
124+
- run:
125+
name: Run tests - google.cloud.translate
126+
command: |
127+
if [[ -n $(grep translate ~/target_packages) ]]; then
128+
nox -f translate/nox.py
129+
fi
130+
- run:
131+
name: Run tests - google.cloud.vision
132+
command: |
133+
if [[ -n $(grep vision ~/target_packages) ]]; then
134+
nox -f vision/nox.py
135+
fi
136+
- deploy:
137+
name: Update the docs
138+
command: nox -e docs
139+
- deploy:
140+
name: Push to PyPI (if this is a release tag).
141+
command: test_utils/scripts/circleci/twine_upload.sh
142+
working_directory: /var/code/gcp/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pip-log.txt
2525

2626
# Unit test / coverage reports
2727
.coverage
28+
.nox
2829
.tox
2930
.cache
3031

.travis.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
language: python
2-
sudo: false
3-
4-
addons:
5-
apt:
6-
sources:
7-
- deadsnakes
8-
packages:
9-
- python3.5
10-
11-
install:
12-
- pip install --upgrade pip tox
13-
14-
script:
15-
- python2.7 scripts/run_unit_tests.py
16-
- if [[ "${TRAVIS_EVENT_TYPE}" != "pull_request" ]]; then python3.4 scripts/run_unit_tests.py; fi
17-
- python3.5 scripts/run_unit_tests.py
18-
- python scripts/run_unit_tests.py --tox-env cover
19-
- tox -e lint
20-
- tox -e system-tests
21-
- tox -e system-tests3
22-
- scripts/update_docs.sh
23-
24-
after_success:
25-
- scripts/coveralls.sh
26-
27-
cache:
28-
directories:
29-
- ${HOME}/.cache/pip
1+
---
2+
# Exclude Travis completely.
3+
# We can remove this file post-merge.
4+
branches:
5+
exclude:
6+
- /.*/

appveyor.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ environment:
1818
# iterations.
1919

2020
# Python 2.7.11 is the latest Python 2.7 with a Windows installer
21-
# Python 2.7.11 is the overall latest
21+
# Python 2.7.13 is the overall latest
2222
# https://www.python.org/ftp/python/2.7.11/
2323
- PYTHON: "C:\\Python27"
2424
PYTHON_VERSION: "2.7.11"
25+
PYTHON_MAJMIN_VERSION: "2.7"
2526
PYTHON_ARCH: "32"
26-
TOX_ENV: "py27"
27+
NOX_ENV: "unit_tests(python_version='2.7')"
2728

2829
# Python 3.5.1 is the latest Python 3.5 with a Windows installer
29-
# Python 3.5.1 is the overall latest
30+
# Python 3.5.3 is the overall latest
3031
# https://www.python.org/ftp/python/3.5.1/
3132
- PYTHON: "C:\\Python35-x64"
3233
PYTHON_VERSION: "3.5.1"
34+
PYTHON_MAJMIN_VERSION: "3.5"
3335
PYTHON_ARCH: "64"
34-
TOX_ENV: "py35"
36+
NOX_ENV: "unit_tests(python_version='3.5')"
3537

3638
install:
3739
- ECHO "Filesystem root:"
@@ -69,8 +71,37 @@ build_script:
6971

7072
test_script:
7173
- "%CMD_IN_ENV% pip list"
74+
75+
# AppVeyor gets confused by a nox.py file in the root, and tries to
76+
# import from it instead of importing actual nox.
77+
#
78+
# This is an annoying problem, but we do not need to build docs here,
79+
# so this is a hack-solution to get around it. I am okay with this in the
80+
# short term because docs will move into their own packages soon, and this
81+
# file will disappear completely.
82+
- '%CMD_IN_ENV% del nox.py'
83+
84+
- '%CMD_IN_ENV% dir'
85+
- '%CMD_IN_ENV% dir bigquery'
86+
7287
# Run the project tests
73-
- "%CMD_IN_ENV% tox -e %TOX_ENV%"
88+
- '%CMD_IN_ENV% nox -f bigquery\nox.py -e "%NOX_ENV%"'
89+
- '%CMD_IN_ENV% nox -f bigtable\nox.py -e "%NOX_ENV%"'
90+
- '%CMD_IN_ENV% nox -f core\nox.py -e "%NOX_ENV%"'
91+
- '%CMD_IN_ENV% nox -f datastore\nox.py -e "%NOX_ENV%"'
92+
- '%CMD_IN_ENV% nox -f dns\nox.py -e "%NOX_ENV%"'
93+
- '%CMD_IN_ENV% nox -f error_reporting\nox.py -e "%NOX_ENV%"'
94+
- '%CMD_IN_ENV% nox -f language\nox.py -e "%NOX_ENV%"'
95+
- '%CMD_IN_ENV% nox -f logging\nox.py -e "%NOX_ENV%"'
96+
- '%CMD_IN_ENV% nox -f monitoring\nox.py -e "%NOX_ENV%"'
97+
- '%CMD_IN_ENV% nox -f pubsub\nox.py -e "%NOX_ENV%"'
98+
- '%CMD_IN_ENV% nox -f resource_manager\nox.py -e "%NOX_ENV%"'
99+
- '%CMD_IN_ENV% nox -f runtimeconfig\nox.py -e "%NOX_ENV%"'
100+
- '%CMD_IN_ENV% nox -f spanner\nox.py -e "%NOX_ENV%"'
101+
- '%CMD_IN_ENV% nox -f speech\nox.py -e "%NOX_ENV%"'
102+
- '%CMD_IN_ENV% nox -f storage\nox.py -e "%NOX_ENV%"'
103+
- '%CMD_IN_ENV% nox -f translate\nox.py -e "%NOX_ENV%"'
104+
- '%CMD_IN_ENV% nox -f vision\nox.py -e "%NOX_ENV%"'
74105

75106
after_test:
76107
# If tests are successful, create binary packages for the project.

appveyor/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# pip will build them from source using the MSVC compiler matching the
44
# target Python version and architecture
55
wheel
6-
tox
6+
nox-automation==0.11.2

bigquery/.flake8

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[flake8]
2+
exclude =
3+
__pycache__,
4+
.git,
5+
*.pyc,
6+
conf.py

0 commit comments

Comments
 (0)