coveralls-multi 1.1.2 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +11 -1
- data/README.md +31 -10
- data/lib/coveralls-multi/formatters/excoveralls.rb +13 -1
- data/lib/coveralls-multi/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8441c1e4d66a1cf7607a2c4c95319a14a39fbe1fdeb3bc1ac8e5f7d206a65cf1
|
4
|
+
data.tar.gz: 46c4e9918d6276588cd239871721ccdcb75ddc6b4659e08309b95db5439db387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a302753703820c50e5ae3bbfa601fd31e54a2b76b20c0186a897d900cf960166ce4c121af7edbc97208ccfb3cfd9a53f13f0c46affbe97bd9156f8d5d099d334
|
7
|
+
data.tar.gz: 10b9add91ea9b65a8cc7ea503e417cd8265dda9512374e7e7dbd99f4356548ada13bb82b3f5ca74a59a266ac10c8c48483bda47f6093bfc6c2d178320afc6110
|
data/.travis.yml
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
|
4
|
+
- 2.5.1
|
5
5
|
before_install: gem install bundler -v 1.16.1
|
6
|
+
script: bundle exec rspec
|
7
|
+
deploy:
|
8
|
+
provider: rubygems
|
9
|
+
api_key:
|
10
|
+
secure: UpgSvvPDay6lbcxVUtlChzR56u1bLTX+DXrCLxxQpKBQ8rdj+PoKUXwGzCjks1n0lGSPd6t95YJ0l9yOyrPRWj19x//aQAj5FckhldBcacR6bPBwruK0WrFMUdrUMafldxHjeYl4wWy8degThCgie1oMB2IT2l6lLJ7RyjydXNE6CqU5Fq6SYn0/bi9E7jnzAXN6wnY8PvLeOOKqK8fKSq6xtMROWN0gNM0y9q986eRjkeWWZF1eG2ZICwAQVp5ybXPYH3Riqn2Pp9J8W2uu9npp7E/V73Y7PWHeW4oXw1X5NOwgLf3A/yoAkfplGk/CDx3zLXVmEMjMf9VYTCgmW5/Unh7VQj5JfMMQQXCEXrFmaTg7A7v1PrabOMQ6GUSriic+shygpEjPk5WJfqA20Kr7H6Q9FRGCAvq1kRB85E+2y4oDrBG+YixlfjPhXcIDQPnaTAaDP886eLjQUNtU0AuSmzKeBhCbVj30G4TOGflo8wY/idyYsLbmFaxJC0UZFlkxulpvBQZVG51OIOmjqwcdZHwJ6qpIJKl8E4rG03Kpzf0jk5TWyUmj72/tkXpKQLCkNm5+9k6XXGUrhiNkII9MqIlqXcG0rYWGI37szwDwNPe7oyjHbFPx6ZgoieybUR0lKJ+Tx/DVCd0QaX0iSpmBnnpyKnXF4kmJE4Rnq/c=
|
11
|
+
gem: coveralls-multi
|
12
|
+
on:
|
13
|
+
tags: true
|
14
|
+
repo: radditude/coveralls-multi
|
15
|
+
branch: master
|
data/README.md
CHANGED
@@ -1,18 +1,28 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/coveralls-multi) [](https://travis-ci.org/radditude/coveralls-multi) [](https://coveralls.io/github/radditude/coveralls-multi)
|
4
|
+
|
1
5
|
# CoverallsMulti
|
2
6
|
|
3
|
-
CoverallsMulti is a Coveralls client with support for multi-language repos.
|
7
|
+
CoverallsMulti is a Coveralls client with support for multi-language repos. Once you've set up coverage tools for all the languages in your repo, specify the paths to your coverage output files in `.coveralls.yml` and let CoverallsMulti handle formatting them, merging them into one big superfile, and posting the result to Coveralls.io.
|
4
8
|
|
5
9
|
### Currently supported:
|
6
10
|
|
11
|
+
#### Languages & Output Formats
|
12
|
+
|
13
|
+
| *Language* | *Coverage tool* | *Config key* |
|
14
|
+
|----------- | --------------- | ------------ |
|
15
|
+
| Elixir | [ExCoveralls](https://github.com/parroty/excoveralls) (JSON output) | `excoveralls` |
|
16
|
+
| JavaScript | [nyc](https://github.com/istanbuljs/nyc), or any tool that can output an lcov file | `lcov` |
|
17
|
+
| Ruby | [SimpleCov](https://github.com/colszowka/simplecov) | `simplecov` |
|
18
|
+
|
7
19
|
#### CI Providers
|
8
|
-
- TravisCI
|
9
20
|
|
10
|
-
|
11
|
-
- Ruby (SimpleCov)
|
12
|
-
- JavaScript (lcov)
|
21
|
+
- TravisCI
|
13
22
|
|
14
23
|
#### Coming Soon
|
15
|
-
|
24
|
+
|
25
|
+
Have another language, tool, or CI provider you'd like to see supported? [Let me know](https://github.com/radditude/coveralls-multi/issues/new).
|
16
26
|
|
17
27
|
## Installation
|
18
28
|
|
@@ -32,9 +42,9 @@ Or install it yourself as:
|
|
32
42
|
|
33
43
|
## Usage
|
34
44
|
|
35
|
-
Set up coverage measurement for each
|
45
|
+
0. Set up coverage measurement for each language. Coveralls-multi is only concerned with formatting & posting the output files, so choice of tooling is up to you.
|
36
46
|
|
37
|
-
Once you know where the output files will go,
|
47
|
+
1. Once you know where the output files will go, set up your `.coveralls.yml` with the appropriate keys and paths like so (see supported languages above for more details on the supported config keys):
|
38
48
|
|
39
49
|
```
|
40
50
|
service_name: travis-ci
|
@@ -42,9 +52,20 @@ repo_token: [REPO_TOKEN]
|
|
42
52
|
multi:
|
43
53
|
simplecov: coverage/.resultset.json
|
44
54
|
lcov: coverage/lcov.info
|
55
|
+
excoveralls: cover/excoveralls.json
|
45
56
|
```
|
46
57
|
|
47
|
-
|
58
|
+
2. Run `coveralls-multi` to merge the output files and send them to Coveralls. In a CI environment, you can run `coveralls-multi` as an final step after you run your test commands.
|
59
|
+
|
60
|
+
_Note for ExCoveralls:_ Currently, formatting will break if the ExCoveralls output directory is called something other than the default `cover`. You don't need to worry about this unless you've changed the default `output_dir` in your ExCoveralls config.
|
61
|
+
|
62
|
+
## Troubleshooting
|
63
|
+
|
64
|
+
Debug mode will save and output the merged file so you can take a closer look. To enable debug mode, add the following line to `.coveralls.yml`:
|
65
|
+
|
66
|
+
```
|
67
|
+
debug_mode: true
|
68
|
+
```
|
48
69
|
|
49
70
|
## Development
|
50
71
|
|
@@ -52,7 +73,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
52
73
|
|
53
74
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
54
75
|
|
55
|
-
TODO:
|
76
|
+
TODO: add better contributing instructions (especially for adding a new formatter)
|
56
77
|
|
57
78
|
## Contributing
|
58
79
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
module CoverallsMulti
|
4
5
|
class Formatter
|
@@ -7,7 +8,18 @@ module CoverallsMulti
|
|
7
8
|
class Excoveralls
|
8
9
|
def run(file_path)
|
9
10
|
file = CoverallsMulti::Formatter.parse_json(file_path)
|
10
|
-
|
11
|
+
# ExCoveralls uses paths relative to the elixir app root, which breaks things
|
12
|
+
# if the elixir app is in a subdirectory of the repo as a whole.
|
13
|
+
# So, for a somewhat hacky solution, we grab the subdirectory if it exists
|
14
|
+
# based on the path of the coverage file...
|
15
|
+
subdirectory = file_path.split('cover')[0]
|
16
|
+
source_files = file['source_files'].map do |source_file|
|
17
|
+
path = source_file['name']
|
18
|
+
# ...and prepend it to the file path before sending things off to Coveralls.
|
19
|
+
source_file['name'] = subdirectory + path
|
20
|
+
source_file
|
21
|
+
end
|
22
|
+
source_files
|
11
23
|
rescue StandardError => e
|
12
24
|
raise e, "There was a problem converting the excoveralls file at #{file_path}"
|
13
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls-multi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CJ Horton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.7.
|
163
|
+
rubygems_version: 2.7.7
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Coveralls client for multi-language repos.
|