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

Test commit: inspect the env. vars. Travis uses. #2309

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.
62 changes: 62 additions & 0 deletions scripts/show_git_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash
set -e

echo 'git --version:'
echo '------------------------------------'
git --version

# SEP
echo '===================================='
# SEP

echo 'git status:'
echo '------------------------------------'
git status

# SEP
echo '===================================='
# SEP

echo 'git remote -vv:'
echo '------------------------------------'
git remote -vv

# SEP
echo '===================================='
# SEP

echo 'git branch -vv:'
echo '------------------------------------'
git branch -vv

# SEP
echo '===================================='
# SEP

echo 'git branch -a:'
echo '------------------------------------'
git branch -a

# SEP
echo '===================================='
# SEP

echo 'git log -5:'
echo '------------------------------------'
git --no-pager log -5

# SEP
echo '===================================='
# SEP

echo 'git log -5 master:'
echo '------------------------------------'
git --no-pager log -5 master

# SEP
echo '===================================='
# SEP

echo 'git log -5 origin/master:'
echo '------------------------------------'
git --no-pager log -5 origin/master