coveralls-multi 1.1.2 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61f4cc6605887257e4da0207b424bc45bd28686c6245a907eb82294a0d03d382
4
- data.tar.gz: a392c2e6084fa880f6ca306d947e9ee47e4ed8a9e63b9b23b7fbb0952e4f4795
3
+ metadata.gz: 8441c1e4d66a1cf7607a2c4c95319a14a39fbe1fdeb3bc1ac8e5f7d206a65cf1
4
+ data.tar.gz: 46c4e9918d6276588cd239871721ccdcb75ddc6b4659e08309b95db5439db387
5
5
  SHA512:
6
- metadata.gz: 6a8de4206e8d13208a8c8e37ab29200cc299e59f55e3a7e778ffc334fe4beee18537d1db2ed46628aceb144288dbc7d7c1f8d686f8421ba0b229ddadbf8044aa
7
- data.tar.gz: 8b59b47d986a7e76930430a7f08d035a05aa743428e7f0d61af04a6495a3e9eab8d5e513b9c1ad1b2b67de2eac21156d7a61d55b8fcf9ee9a551bcba79976dfe
6
+ metadata.gz: a302753703820c50e5ae3bbfa601fd31e54a2b76b20c0186a897d900cf960166ce4c121af7edbc97208ccfb3cfd9a53f13f0c46affbe97bd9156f8d5d099d334
7
+ data.tar.gz: 10b9add91ea9b65a8cc7ea503e417cd8265dda9512374e7e7dbd99f4356548ada13bb82b3f5ca74a59a266ac10c8c48483bda47f6093bfc6c2d178320afc6110
@@ -1,5 +1,15 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.5.1
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
+ [![coveralls-multi](https://img.shields.io/gem/v/coveralls-multi.svg)](https://rubygems.org/gems/coveralls-multi) [![Travis](https://img.shields.io/travis/radditude/coveralls-multi/master.svg)](https://travis-ci.org/radditude/coveralls-multi) [![Coverage Status](https://coveralls.io/repos/github/radditude/coveralls-multi/badge.svg)](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. Specify the paths to your coverage output files in `.coveralls.yml`, and CoverallsMulti will handle formatting them, merging them into one big superfile, and posting the result to Coveralls.io.
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
- #### Languages/Output Formats
11
- - Ruby (SimpleCov)
12
- - JavaScript (lcov)
21
+ - TravisCI
13
22
 
14
23
  #### Coming Soon
15
- - Elixir
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 of the languages in your repo (TODO: add links to setup instructions for supported languages).
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, add the output type and path to `.coveralls.yml`. Example:
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
- Then run `coveralls-multi` to merge the output files and send them to Coveralls. In a CI environment, run `coveralls-multi` after you run your test commands.
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: more detailed instructions for adding a new formatter
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
- file['source_files']
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
@@ -1,3 +1,3 @@
1
1
  module CoverallsMulti
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  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.1.2
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-07-06 00:00:00.000000000 Z
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.6
163
+ rubygems_version: 2.7.7
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Coveralls client for multi-language repos.