Skip to content

Travis: Fix tools testing breakage due to multiple python versions #6200

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

Closed
wants to merge 7 commits into from
Closed
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
37 changes: 20 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
--data @- << DATA\n{
"state": "$0",
"description": "$1",
"context": "travis-ci/$NAME/$(python --version)",
"context": "travis-ci/$NAME",
"target_url": "https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID"
}\nDATA'

Expand Down Expand Up @@ -74,23 +74,31 @@ matrix:

- env:
- NAME=tools
python:
- '2.7'
- '3.5'
- '3.6'
install:
# Install dependencies
- sudo apt-get install gcc-arm-embedded
- pip install -r requirements.txt
- pip install pytest pylint hypothesis mock coverage coveralls
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt-get update
- sudo apt-get install gcc-arm-embedded python{2.7,3.5,3.6} python{,3}-pip
- pip2 install -r requirements.txt
- pip3 install -r requirements.txt
- pip2 install pytest pylint hypothesis mock coverage coveralls
- pip3 install pytest pylint hypothesis mock coverage coveralls
# Print versions we use
- arm-none-eabi-gcc --version
- python --version
- python2.7 --version
- python3.5 --version
- python3.6 --version
script:
# Run local testing on tools
- PYTHONPATH=. coverage run -a -m pytest tools/test
- python2 tools/test/pylint.py
- coverage run -a tools/project.py -S | sed -n '/^Total/p'
- PYTHONPATH=. coverage-2.7 run -a -m pytest tools/test
- PYTHONPATH=. coverage-3.5 run -a -m pytest tools/test
- PYTHONPATH=. coverage-3.6 run -a -m pytest tools/test
- python2.7 tools/test/pylint.py
- python3.5 tools/test/pylint.py
- python3.6 tools/test/pylint.py
- coverage-2.7 run -a tools/project.py -S | sed -n '/^Total/p'
- coverage-3.5 run -a tools/project.py -S | sed -n '/^Total/p'
- coverage-3.6 run -a tools/project.py -S | sed -n '/^Total/p'
- coverage html
after_success:
# Coverage for tools
Expand Down Expand Up @@ -199,8 +207,3 @@ matrix:
env: NAME=mbed2-NUVOTON
- <<: *mbed-2
env: NAME=mbed2-RENESAS
# Change python version here only because 3x the other jobs does not add any more coverage
python:
- '2.7'
- '3.5'
- '3.6'