Skip to content

Commit 09d9af1

Browse files
committed
Added coverage to GitHub pages
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent 7d1481f commit 09d9af1

23 files changed

+2424
-1
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ jobs:
1010
- npm run build:prod
1111
- export PKG_NAME=$(node -e "console.log(require('./dist/package/production/package').name)")
1212
- export PKG_VERSION=$(node -e "console.log(require('./dist/package/production/package').version)")
13+
- npm run test:coverage
14+
- cp -r dist/homepage/$PKG_NAME/$PKG_VERSION page
15+
- cp -r dist/jest/coverage/lcov-report page
1316
- cd dist/package/production
1417
- zip -9 --recurse-paths ../../${PKG_NAME}_v$PKG_VERSION.zip **
1518
- zip -9 --recurse-paths ../../${PKG_NAME}_v${PKG_VERSION}_min.zip ** --exclude \*.d.ts --exclude readme.* --exclude \*.map
1619
- cd ../../..
1720
deploy:
1821
- provider: pages
19-
local_dir: dist/homepage/$PKG_NAME/$PKG_VERSION
22+
local_dir: page
2023
fqdn: $PKG_NAME.jaid.codes
2124
skip_cleanup: true
2225
github_token: $GITHUB_TOKEN # Permissions: public_repo, repo:status, repo_deployment

page/coverage/clover.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<coverage generated="1550609611210" clover="3.2.0">
3+
<project timestamp="1550609611211" name="All files">
4+
<metrics statements="11" coveredstatements="10" conditionals="5" coveredconditionals="4" methods="1" coveredmethods="1" elements="17" coveredelements="15" complexity="0" loc="11" ncloc="11" packages="1" files="1" classes="1"/>
5+
<file name="index.js" path="/home/jaid/dev/array-to-object-keys/src/index.js">
6+
<metrics statements="11" coveredstatements="10" conditionals="5" coveredconditionals="4" methods="1" coveredmethods="1"/>
7+
<line num="31" count="3" type="cond" truecount="1" falsecount="1"/>
8+
<line num="32" count="0" type="stmt"/>
9+
<line num="34" count="3" type="stmt"/>
10+
<line num="35" count="3" type="cond" truecount="2" falsecount="0"/>
11+
<line num="36" count="1" type="stmt"/>
12+
<line num="37" count="1" type="stmt"/>
13+
<line num="38" count="2" type="stmt"/>
14+
<line num="39" count="2" type="stmt"/>
15+
<line num="42" count="2" type="stmt"/>
16+
<line num="43" count="4" type="stmt"/>
17+
<line num="46" count="3" type="stmt"/>
18+
</file>
19+
</project>
20+
</coverage>

page/coverage/coverage-final.json

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
{
2+
"/home/jaid/dev/array-to-object-keys/src/index.js": {
3+
"path": "/home/jaid/dev/array-to-object-keys/src/index.js",
4+
"statementMap": {
5+
"0": {
6+
"start": {
7+
"line": 31,
8+
"column": 2
9+
},
10+
"end": {
11+
"line": 33,
12+
"column": 3
13+
}
14+
},
15+
"1": {
16+
"start": {
17+
"line": 32,
18+
"column": 4
19+
},
20+
"end": {
21+
"line": 32,
22+
"column": 13
23+
}
24+
},
25+
"2": {
26+
"start": {
27+
"line": 34,
28+
"column": 17
29+
},
30+
"end": {
31+
"line": 34,
32+
"column": 19
33+
}
34+
},
35+
"3": {
36+
"start": {
37+
"line": 35,
38+
"column": 2
39+
},
40+
"end": {
41+
"line": 45,
42+
"column": 3
43+
}
44+
},
45+
"4": {
46+
"start": {
47+
"line": 36,
48+
"column": 16
49+
},
50+
"end": {
51+
"line": 36,
52+
"column": 17
53+
}
54+
},
55+
"5": {
56+
"start": {
57+
"line": 37,
58+
"column": 4
59+
},
60+
"end": {
61+
"line": 40,
62+
"column": 5
63+
}
64+
},
65+
"6": {
66+
"start": {
67+
"line": 38,
68+
"column": 6
69+
},
70+
"end": {
71+
"line": 38,
72+
"column": 50
73+
}
74+
},
75+
"7": {
76+
"start": {
77+
"line": 39,
78+
"column": 6
79+
},
80+
"end": {
81+
"line": 39,
82+
"column": 13
83+
}
84+
},
85+
"8": {
86+
"start": {
87+
"line": 42,
88+
"column": 4
89+
},
90+
"end": {
91+
"line": 44,
92+
"column": 5
93+
}
94+
},
95+
"9": {
96+
"start": {
97+
"line": 43,
98+
"column": 6
99+
},
100+
"end": {
101+
"line": 43,
102+
"column": 36
103+
}
104+
},
105+
"10": {
106+
"start": {
107+
"line": 46,
108+
"column": 2
109+
},
110+
"end": {
111+
"line": 46,
112+
"column": 15
113+
}
114+
}
115+
},
116+
"fnMap": {
117+
"0": {
118+
"name": "(anonymous_0)",
119+
"decl": {
120+
"start": {
121+
"line": 30,
122+
"column": 15
123+
},
124+
"end": {
125+
"line": 30,
126+
"column": 16
127+
}
128+
},
129+
"loc": {
130+
"start": {
131+
"line": 30,
132+
"column": 49
133+
},
134+
"end": {
135+
"line": 47,
136+
"column": 1
137+
}
138+
},
139+
"line": 30
140+
}
141+
},
142+
"branchMap": {
143+
"0": {
144+
"loc": {
145+
"start": {
146+
"line": 30,
147+
"column": 23
148+
},
149+
"end": {
150+
"line": 30,
151+
"column": 44
152+
}
153+
},
154+
"type": "default-arg",
155+
"locations": [
156+
{
157+
"start": {
158+
"line": 30,
159+
"column": 40
160+
},
161+
"end": {
162+
"line": 30,
163+
"column": 44
164+
}
165+
}
166+
],
167+
"line": 30
168+
},
169+
"1": {
170+
"loc": {
171+
"start": {
172+
"line": 31,
173+
"column": 2
174+
},
175+
"end": {
176+
"line": 33,
177+
"column": 3
178+
}
179+
},
180+
"type": "if",
181+
"locations": [
182+
{
183+
"start": {
184+
"line": 31,
185+
"column": 2
186+
},
187+
"end": {
188+
"line": 33,
189+
"column": 3
190+
}
191+
},
192+
{
193+
"start": {
194+
"line": 31,
195+
"column": 2
196+
},
197+
"end": {
198+
"line": 33,
199+
"column": 3
200+
}
201+
}
202+
],
203+
"line": 31
204+
},
205+
"2": {
206+
"loc": {
207+
"start": {
208+
"line": 35,
209+
"column": 2
210+
},
211+
"end": {
212+
"line": 45,
213+
"column": 3
214+
}
215+
},
216+
"type": "if",
217+
"locations": [
218+
{
219+
"start": {
220+
"line": 35,
221+
"column": 2
222+
},
223+
"end": {
224+
"line": 45,
225+
"column": 3
226+
}
227+
},
228+
{
229+
"start": {
230+
"line": 35,
231+
"column": 2
232+
},
233+
"end": {
234+
"line": 45,
235+
"column": 3
236+
}
237+
}
238+
],
239+
"line": 35
240+
}
241+
},
242+
"s": {
243+
"0": 3,
244+
"1": 0,
245+
"2": 3,
246+
"3": 3,
247+
"4": 1,
248+
"5": 1,
249+
"6": 2,
250+
"7": 2,
251+
"8": 2,
252+
"9": 4,
253+
"10": 3
254+
},
255+
"f": {
256+
"0": 3
257+
},
258+
"b": {
259+
"0": [
260+
1
261+
],
262+
"1": [
263+
0,
264+
3
265+
],
266+
"2": [
267+
1,
268+
2
269+
]
270+
},
271+
"_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184",
272+
"hash": "81b68f5ca3725f5a62043672c8c438d9f5df0be2"
273+
}
274+
}

0 commit comments

Comments
 (0)