Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify noxfile setup. #2806

Merged
merged 25 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f79eff1
Simplify noxfile and add version control.
kurtisvg Mar 30, 2020
9406ab5
Configure appengine/standard to only test Python 2.7.
kurtisvg Mar 30, 2020
09dbf0b
Update Kokokro configs to match noxfile.
kurtisvg Mar 30, 2020
db2a756
chore(deps): update dependency requests to v2.23.0
renovate-bot Mar 30, 2020
c2cd7d4
Add requirements-test to each folder.
kurtisvg Mar 30, 2020
839b174
Remove Py2 versions from everything execept appengine/standard.
kurtisvg Mar 31, 2020
9533042
Remove conftest.py.
kurtisvg Mar 31, 2020
aa84e9d
Remove appengine/standard/conftest.py
kurtisvg Mar 31, 2020
7df0f42
Remove 'no-sucess-flaky-report' from pytest.ini.
kurtisvg Mar 31, 2020
41af79d
Add GAE SDK back to appengine/standard tests.
kurtisvg Mar 31, 2020
0ba884f
Fix typo.
kurtisvg Mar 31, 2020
a249e13
Roll pytest to python 2 version.
kurtisvg Mar 31, 2020
346afbe
Add a bunch of testing requirements.
kurtisvg Mar 31, 2020
982b783
Remove typo.
kurtisvg Mar 31, 2020
3f9581a
Add appengine lib directory back in.
kurtisvg Mar 31, 2020
95b1aef
Add some additional requirements.
kurtisvg Mar 31, 2020
93e3b46
Fix issue with flake8 args.
kurtisvg Mar 31, 2020
542b88d
Even more requirements.
kurtisvg Apr 1, 2020
72f3953
Readd appengine conftest.py.
kurtisvg Apr 1, 2020
a57a00c
Add a few more requirements.
kurtisvg Apr 1, 2020
228ee35
Even more Appengine requirements.
kurtisvg Apr 1, 2020
783d322
Add webtest for appengine/standard/mailgun.
kurtisvg Apr 1, 2020
3fdf399
Add some additional requirements.
kurtisvg Apr 1, 2020
c588248
Add workaround for issue with mailjet-rest.
kurtisvg Apr 1, 2020
3c841bd
Add responses for appengine/standard/mailjet.
kurtisvg Apr 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .kokoro/python2.7/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ action {
# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "gae"
value: "py-2.7"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ action {
# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py3-3.6"
value: "py-3.6"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.7/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ action {
# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py3-3.7"
value: "py-3.7"
}
45 changes: 45 additions & 0 deletions .kokoro/python3.8/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Format: //devtools/kokoro/config/proto/build.proto

timeout_mins: 300

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-docs-samples/.kokoro/trampoline.sh"

# Download secrets from Cloud Storage.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"

# Copy results for Resultstore
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py-3.8"
}
21 changes: 21 additions & 0 deletions .kokoro/python3.8/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
}
21 changes: 21 additions & 0 deletions .kokoro/python3.8/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
}
21 changes: 21 additions & 0 deletions .kokoro/python3.8/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-docs-samples/.kokoro/tests/run_tests_only_diff.sh"
}
9 changes: 7 additions & 2 deletions .kokoro/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ for file in **/requirements.txt; do

# If no local noxfile exists, copy the one from root
if [[ ! -f "noxfile.py" ]]; then
cp "$ROOT/noxfile-template.py" "./noxfile.py"
echo -e "\n Using noxfile from project root. \n"
PARENT_DIR=$(cd ../ && pwd)
while [[ "$PARENT_DIR" != "$ROOT" && ! -f "$PARENT_DIR/noxfile-template.py" ]];
do
PARENT_DIR=$(dirname "$PARENT_DIR")
done
cp "$PARENT_DIR/noxfile-template.py" "./noxfile.py"
echo -e "\n Using noxfile-template from parent folder ($PARENT_DIR). \n"
fi

# Use nox to execute the tests for the project.
Expand Down
2 changes: 2 additions & 0 deletions appengine/flexible/analytics/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==5.3.2
responses==0.10.12
2 changes: 1 addition & 1 deletion appengine/flexible/analytics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
gunicorn==20.0.4
requests[security]==2.22.0
requests[security]==2.23.0
1 change: 1 addition & 0 deletions appengine/flexible/cloudsql/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/datastore/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/disk/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/django_cloudsql/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/extending_runtime/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/hello_world/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
2 changes: 2 additions & 0 deletions appengine/flexible/mailgun/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==5.3.2
responses==0.10.12
2 changes: 1 addition & 1 deletion appengine/flexible/mailgun/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
gunicorn==20.0.4
requests[security]==2.22.0
requests[security]==2.23.0
2 changes: 2 additions & 0 deletions appengine/flexible/mailjet/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==5.3.2
responses==0.10.12
2 changes: 1 addition & 1 deletion appengine/flexible/mailjet/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==1.1.1
gunicorn==20.0.4
requests[security]==2.22.0
requests[security]==2.23.0
mailjet-rest==1.3.3
1 change: 1 addition & 0 deletions appengine/flexible/memcache/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/metadata/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
2 changes: 1 addition & 1 deletion appengine/flexible/metadata/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
gunicorn==20.0.4
requests[security]==2.22.0
requests[security]==2.23.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
gunicorn==20.0.4
requests==2.22.0
requests==2.23.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
gunicorn==20.0.4
requests==2.22.0
requests==2.23.0
1 change: 1 addition & 0 deletions appengine/flexible/numpy/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/pubsub/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/redis/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/scipy/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
2 changes: 2 additions & 0 deletions appengine/flexible/sendgrid/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==5.3.2
mock==3.0.5
1 change: 1 addition & 0 deletions appengine/flexible/static_files/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/storage/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions appengine/flexible/tasks/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
2 changes: 2 additions & 0 deletions appengine/flexible/twilio/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==5.3.2
responses==0.10.12
3 changes: 3 additions & 0 deletions appengine/flexible/websockets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==5.3.2
retrying==1.3.3
websocket-client==0.56.0
2 changes: 1 addition & 1 deletion appengine/flexible/websockets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==1.1.1
Flask-Sockets==0.2.1
gunicorn==20.0.4
requests==2.22.0
requests==2.23.0
3 changes: 3 additions & 0 deletions appengine/standard/analytics/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
responses==0.10.12
2 changes: 1 addition & 1 deletion appengine/standard/analytics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.1.1
requests==2.22.0
requests==2.23.0
requests-toolbelt==0.9.1
3 changes: 3 additions & 0 deletions appengine/standard/blobstore/blobreader/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
WebTest==2.0.34
3 changes: 3 additions & 0 deletions appengine/standard/blobstore/gcs/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
WebTest==2.0.34
2 changes: 2 additions & 0 deletions appengine/standard/django/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
mock==3.0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
mock==3.0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
mock==3.0.5
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Flask==1.1.1
pyjwt==1.7.1
flask-cors==3.0.8
google-auth==1.11.2
requests==2.22.0
requests==2.23.0
requests-toolbelt==0.9.1
3 changes: 3 additions & 0 deletions appengine/standard/firebase/firetactoe/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
WebTest==2.0.34
2 changes: 1 addition & 1 deletion appengine/standard/firebase/firetactoe/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
flask==1.1.1
requests==2.22.0
requests==2.23.0
requests_toolbelt==0.9.1
oauth2client==4.1.3
functools32==3.2.3.post2; python_version < "3"
2 changes: 2 additions & 0 deletions appengine/standard/flask/tutorial/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
3 changes: 3 additions & 0 deletions appengine/standard/iap/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
WebTest==2.0.34
5 changes: 5 additions & 0 deletions appengine/standard/mailgun/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
google-api-python-client==1.7.11
mock==3.0.5
WebTest==2.0.34
3 changes: 3 additions & 0 deletions appengine/standard/mailjet/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
responses==0.10.12
2 changes: 1 addition & 1 deletion appengine/standard/mailjet/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==1.1.1
requests==2.22.0
requests==2.23.0
requests-toolbelt==0.9.1
mailjet-rest==1.3.3
2 changes: 2 additions & 0 deletions appengine/standard/ndb/transactions/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest==4.6.9
gcp-devrel-py-tools==0.0.15
Loading