• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

all3fox / scancode-toolkit
76%
develop: 76%

Build:
Build:
LAST BUILD BRANCH: travis-ci
DEFAULT BRANCH: develop
Repo Added 27 Mar 2017 12:21AM UTC
Files 87
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH issue-564-ci
branch: issue-564-ci
CHANGE BRANCH
x
Reset
  • issue-564-ci
  • develop
  • issue-564-ci-poking
  • travis-ci

pending completion
73

push

travis-ci

all3fox
#564 Add code coverage to .travis-ci

1) Change to language: python to control python version precisely

Otherwise, if you use language: cpp (previous) or language: generic,
you get either `2.7.3` or `2.7.9` which do not work with coveralls.

With them the build succeeds but sending coverage silently fails.

2) Include osx explicitly and use language: generic trick

According to [1], travis osx images cannot be used in language: python
builds. So, remove the explicit

os:
  - linux
  - osx

part of the build matrix and instead manually append osx entries with
this trick: `language: generic` overrides `language: python` and
`python:` (empty python entry) looks less confusing in Web UI.

[1]: https://docs.travis-ci.com/user/multi-os/#Python-example-(unsupported-languages)

3) Move ./bin/py.test commands from env: matrix section

These environment variables were not properly picked up by include'ed
osx images. Instead, they were picked up as one big lump and the last
one overwrote all the previous ones.

Tried to preserve them as some kind of a matrix but failed. Finally,
moved them into script: section and made explicit.

Also changed them to use the coverage plugin and collect coverage.

4) Add ./bin/coveralls that reports coverage to coveralls.io
5) Move ./etc/release/release.sh into after_success

It had to be moved from scripts: section and be put *after* the call
to coveralls because it wipes the venv everything was installed to.

Finally, current .travis.yml explicitly uses pip to install
`pytest-cov` and `coveralls` into the venv created by ./configure
because these packages depend on `coverage` which in turn does not
provide an obvious way to create a universal `py2.py3-none-any` wheel,
because it contains C extensions.

Building and shipping `coverage` and its descendants together with
`scancode-toolkit` will be next.

Refs: https://github.com/nexB/scancode-toolkit/issues/564

Signed-off-by: Aleksandr Lisianoi <all3fox@gmail.com>

7735 of 10204 relevant lines covered (75.8%)

1.51 hits per line

Relevant lines Covered
Build:
Build:
10204 RELEVANT LINES 7735 COVERED LINES
1.51 HITS PER LINE
Source Files on issue-564-ci
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
73 issue-564-ci #564 Add code coverage to .travis-ci 1) Change to language: python to control python version precisely Otherwise, if you use language: cpp (previous) or language: generic, you get either `2.7.3` or `2.7.9` which do not work with coveralls. With... push 29 Mar 2017 11:23PM UTC all3fox travis-ci pending completion  
72 issue-564-ci Change .travis.yml to enable test coverage reports 1) Change to language: python to control python version precisely Otherwise, if you use language: cpp (previous) or language: generic, you get either `2.7.3` or `2.7.9` which do not work with co... push 29 Mar 2017 10:24PM UTC all3fox travis-ci pending completion  
69 issue-564-ci Change .travis.yml to enable test coverage reports 1) Change to language: python to control python version precisely Otherwise, if you use language: cpp (previous) or language: generic, you get either `2.7.3` or `2.7.9` which do not work with co... push 29 Mar 2017 10:25AM UTC all3fox travis-ci pending completion  
34 issue-564-ci Add coverage badges to the table in README.rst SIgned-off-by: Aleksandr Lisianoi <all3fox@gmail.com> Refs: https://github.com/nexB/scancode-toolkit/issues/564 push 28 Mar 2017 12:28AM UTC all3fox travis-ci pending completion  
See All Builds (33)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc