-
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(#158) * add extra_req[test] (for pip) * basic code that make possible to run tests with real S3 * remove py26 outdated stuff * fix pep * Enable real s3 testing for 27, 36 with encrypted credentials + fixes for Travis * fix travisfile * fix travis[2] * try to understand what happens with travis * fix travis[3] * use different bucket to avoiding raise condition * generate unique bucket name (prevent race condition) + cleanup S3 after tests * move api keys to global, add benchmark * add explicit encoding for file + run bench in script session + fix path * fix assert + add distinct buckets for benchmark results * get tests running under Py2.7 * update integration test documentation * Avoid race condition during integration tests Several py2.7/py3.6 tests may be running at the same time, so we want to make sure they face different keys to avoid a race condition * remove quotes to keep travis happy * add missing semicolon * fail the build if integration tests fail * deliberately fail travis build to check .travis.yml * Revert "fail the build if integration tests fail" This reverts commit 3061f5b. * Revert "Revert "fail the build if integration tests fail"" This reverts commit 2dec2b4. * Revert "deliberately fail travis build to check .travis.yml" This reverts commit 4bf0e11. * return getdefaultencoding (mimic to `open`) + fix missing deps for integration-tests + fix benchmark encoding problem
- Loading branch information
1 parent
fbc82cc
commit 6f3a698
Showing
8 changed files
with
148 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,52 @@ | ||
language: python | ||
dist: trusty | ||
sudo: false | ||
|
||
python: | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
env: | ||
global: | ||
- secure: "GH+DI7f9QenVtTZFEfn4B8wO5JJK65PkHDg8vY/npdW51y5PPAynTEf/++D0H4tjwqMuXwB5lrbWfYeskf29Xuq5MT5+FixajZFcbhscoSM9CGABeph2s2+Hm4kSIKmjnTlQLgJHVbwypnlU/W4sfMCbqeOmv2fYXCCt0GhtnWc=" | ||
- secure: "du3PQYEiDPw55TRzhk+Ocv1Gx1DuusbCSMVSQmccAoyOr7qxDqm+1jh2v13RmajNK7FnlKyC4xSTySVpSl70By2uhZlJT43EpenqIcpQWqUAm3nVr6etszdb1A6TfEGQrxZ8Y2j9KD6QAMNovsMZbl0bcDJDxTeFA4P/yU9UZcI=" | ||
|
||
|
||
matrix: | ||
include: | ||
- python: '2.7' | ||
env: | ||
- SO_DISABLE_MOCKS: "1" | ||
- SO_S3_URL: "s3://smart-open-py27-benchmark" | ||
- SO_S3_RESULT_URL: "s3://smart-open-py27-benchmark-results" | ||
|
||
- python: '3.3' | ||
|
||
- python: '3.4' | ||
|
||
- python: '3.5' | ||
|
||
- python: '3.6' | ||
env: | ||
- SO_DISABLE_MOCKS: "1" | ||
- SO_S3_URL: "s3://smart-open-py36-benchmark" | ||
- SO_S3_RESULT_URL: "s3://smart-open-py36-benchmark-results" | ||
|
||
install: | ||
- python setup.py install | ||
- pip install .[test] | ||
- pip freeze | ||
|
||
script: python -W ignore setup.py test | ||
|
||
script: | ||
- python setup.py test | ||
- export SO_S3_URL=$SO_S3_URL/$(python -c 'from uuid import uuid4;print(uuid4())') | ||
- if [[ ${SO_DISABLE_MOCKS} = "1" ]]; then | ||
pip install pytest pytest_benchmark awscli; | ||
set -e; | ||
py.test integration-tests/test_s3.py --benchmark-save=`git rev-parse HEAD`; | ||
set +e; | ||
aws s3 cp .benchmarks/*/*.json ${SO_S3_RESULT_URL}; | ||
aws s3 rm --recursive $SO_S3_URL; | ||
fi | ||
|
||
|
||
cache: | ||
directories: | ||
- "$HOME/.cache/pip" | ||
- "$HOME/.pyenv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytest | ||
pytest_benchmark | ||
awscli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.