Commit aaf41df
committed
ci: switch to excoveralls for accurate Codecov badge
ado_cli uses excoveralls for Codecov; the longbridge CI was using
`mix test --export-coverage lcov.info` which produces the Erlang
cover binary (cover/lcov.info.coverdata). The Codecov CLI accepts
the upload but its Erlang cover parser returns 0% line coverage
on the binary format in the current CLI release (v11.2.8).
The fix: add excoveralls as a dev/test dep, set
`test_coverage: [tool: ExCoveralls, ...]` in mix.exs, and point
the codecov-action at cover/excoveralls.json (the standard
coveralls.io JSON format that Codecov parses correctly).
mix.exs:
- Add `{:excoveralls, "~> 0.18", only: [:dev, :test], runtime: false}`
- Set `test_coverage: [tool: ExCoveralls, ...]` so the ExCoveralls
backend writes the JSON, not Elixir's built-in HTML only.
.github/workflows/ci.yml:
- Drop `--export-coverage lcov.info` from the test step.
- Point codecov-action at cover/excoveralls.json instead of
cover/lcov.info.coverdata.
- Update the artifact upload path to excoveralls.json.
codecov.yml:
- Drop the '0% on Erlang cover binary' note from the previous
commit; the excoveralls path doesn't have that issue.
Verified locally: `MIX_ENV=test mix coveralls.json` produces
cover/excoveralls.json (327K, 33 source files) and reports 90.7%
total coverage. The codecov CLI ingests this directly without
the 0% bug.1 parent 6fcf211 commit aaf41df
4 files changed
Lines changed: 19 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments