Skip to content

Commit 8576e49

Browse files
committed
Adding basic CircleCI configuration.
1 parent a52010e commit 8576e49

File tree

6 files changed

+39
-9
lines changed

6 files changed

+39
-9
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ script:
1414
- scripts/update_docs.sh
1515

1616
after_success:
17-
- scripts/travis_coveralls.sh
17+
- scripts/coveralls.sh
1818

1919
cache:
2020
directories:

circle.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
dependencies:
2+
override:
3+
- pip install --upgrade pip tox tox-pyenv
4+
# latest as of Nov. 7, 2016: 2.7.12, 3.4.5, 3.5.2
5+
- pyenv local 2.7.12 3.4.4 3.5.2
6+
7+
test:
8+
override:
9+
- python2.7 scripts/run_unit_tests.py
10+
- python3.4 scripts/run_unit_tests.py
11+
- python3.5 scripts/run_unit_tests.py
12+
- python scripts/run_unit_tests.py --tox-env cover
13+
- tox -e lint
14+
# - tox -e system-tests
15+
# - tox -e system-tests3
16+
# - scripts/update_docs.sh
17+
post:
18+
- scripts/coveralls.sh
19+
20+
general:
21+
branches:
22+
ignore:
23+
- gh-pages

docs/logging_snippets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,5 +365,6 @@ def main():
365365
for item in to_delete:
366366
_backoff_not_found(item.delete)
367367

368+
368369
if __name__ == '__main__':
369370
main()
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616

1717
set -ev
1818

19-
##################################################
20-
# Only run coveralls during a Travis push build. #
21-
##################################################
19+
#############################################################
20+
# Only run coveralls during a CircleCI / Travis push build. #
21+
#############################################################
2222
if [[ "${TRAVIS_BRANCH}" == "master" ]] && \
2323
[[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
24-
echo "Sending coverage report on a merge to master."
25-
tox -e coveralls
24+
echo "Sending coverage report on a Travis merge to master."
25+
elif [[ "${CIRCLECI}" == "true" ]] && \
26+
[[ "${CIRCLE_BRANCH}" == "master" ]] && \
27+
[[ "${CI_PULL_REQUEST}" == "" ]]; then
28+
echo "Sending coverage report on a CircleCI merge to master."
2629
else
2730
echo "Not on a push build for master, skipping coveralls."
2831
exit
2932
fi
33+
34+
tox -e coveralls

system_tests/system_test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def unique_resource_id(delimiter='_'):
6161
Intended to help locate resources created in particular
6262
testing environments and at particular times.
6363
"""
64-
build_id = os.getenv('TRAVIS_BUILD_ID', '')
64+
build_id = os.getenv(
65+
'TRAVIS_BUILD_ID', os.getenv('CIRCLE_BUILD_NUM', ''))
6566
if build_id == '':
6667
return '%s%d' % (delimiter, 1000 * time.time())
6768
else:

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ skip_install =
128128
py34: True
129129
py35: True
130130
cover: True
131-
passenv = TRAVIS* GOOGLE_CLOUD_*
131+
passenv = CI_* CIRCLE* TRAVIS* GOOGLE_CLOUD_*
132132

133133
[testenv:cover]
134134
commands =
@@ -229,7 +229,7 @@ commands =
229229
python {toxinidir}/system_tests/attempt_system_tests.py {posargs}
230230
deps =
231231
{[testing]deps}
232-
passenv = GOOGLE_* TRAVIS* encrypted_*
232+
passenv = CI_* CIRCLE* GOOGLE_* TRAVIS* encrypted_*
233233

234234
[testenv:system-tests3]
235235
basepython =

0 commit comments

Comments
 (0)