Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
877d9b28
Commit
877d9b28
authored
Jul 22, 2016
by
Adam Reese
Committed by
GitHub
Jul 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #976 from adamreese/feat/parallel-coverage
feat(ci): run test coverage in parallel
parents
1c598c2d
870918d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
coverage.sh
scripts/coverage.sh
+13
-1
No files found.
scripts/coverage.sh
View file @
877d9b28
...
@@ -25,10 +25,22 @@ hash godir 2>/dev/null || go get github.com/Masterminds/godir
...
@@ -25,10 +25,22 @@ hash godir 2>/dev/null || go get github.com/Masterminds/godir
generate_cover_data
()
{
generate_cover_data
()
{
for
d
in
$(
godir
)
;
do
for
d
in
$(
godir
)
;
do
(
local
output
=
"
${
coverdir
}
/
${
d
//\//-
}
.cover"
local
output
=
"
${
coverdir
}
/
${
d
//\//-
}
.cover"
go
test
-coverprofile
=
"
${
output
}
"
-covermode
=
"
$covermode
"
"
$d
"
go
test
-coverprofile
=
"
${
output
}
"
-covermode
=
"
$covermode
"
"
$d
"
)
&
done
done
local
fails
fails
=
0
for
job
in
$(
jobs
-p
)
;
do
wait
"
${
job
}
"
||
let
"fails+=1"
done
if
((
fails
!=
0
))
;
then
echo
"FAILED"
exit
${
fails
}
fi
echo
"mode:
$covermode
"
>
"
$profile
"
echo
"mode:
$covermode
"
>
"
$profile
"
grep
-h
-v
"^mode:"
"
$coverdir
"
/
*
.cover
>>
"
$profile
"
grep
-h
-v
"^mode:"
"
$coverdir
"
/
*
.cover
>>
"
$profile
"
}
}
...
@@ -40,7 +52,7 @@ push_to_coveralls() {
...
@@ -40,7 +52,7 @@ push_to_coveralls() {
generate_cover_data
generate_cover_data
go tool cover
-func
"
${
profile
}
"
go tool cover
-func
"
${
profile
}
"
case
"
$
1
"
in
case
"
$
{
1
-
}
"
in
--html
)
--html
)
go tool cover
-html
"
${
profile
}
"
go tool cover
-html
"
${
profile
}
"
;;
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment