Skip to content

Commit

Permalink
Test commit: inspect the env. vars. Travis / CircleCI use.
Browse files Browse the repository at this point in the history
This is sniffing around towards googleapis#2277, to see how much info
we can use to restrict the tests we run.
  • Loading branch information
dhermes committed Nov 15, 2016
1 parent b92f0cf commit 2a9b150
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 35 deletions.
27 changes: 2 additions & 25 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
- python3.4 scripts/run_unit_tests.py
- 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
- python scripts/print_travis.py
- scripts/show_git_status.sh
12 changes: 2 additions & 10 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@ dependencies:

test:
override:
- python2.7 scripts/run_unit_tests.py
- python3.4 scripts/run_unit_tests.py
- 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
post:
- scripts/coveralls.sh
- python scripts/print_env.py
- scripts/show_git_status.sh

general:
branches:
Expand Down
6 changes: 6 additions & 0 deletions scripts/print_env.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import json
import os


env = dict(os.environ)
print(json.dumps(env, indent=2, sort_keys=True))
10 changes: 10 additions & 0 deletions scripts/print_travis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import os

our_keys = sorted(key for key in os.environ.keys()
if 'travis' in key.lower())
if our_keys:
for key in our_keys:
print('%s: %s' % (key, os.getenv(key)))
else:
print('No keys here, sorry')
# Added just for a commit.
10 changes: 10 additions & 0 deletions scripts/show_git_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ev

git status
echo '===================================='
git remote -vv
echo '===================================='
git branch -vv
echo '===================================='
git branch -a

0 comments on commit 2a9b150

Please sign in to comment.