Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
eraser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenLicht
eraser
Commits
70778f91
Commit
70778f91
authored
Dec 6, 2018
by
René Schöne
Browse files
Options
Downloads
Patches
Plain Diff
Testing ci.
parent
e4c56efc
No related branches found
No related tags found
No related merge requests found
Pipeline
#2337
failed
Dec 6, 2018
Stage: build
Stage: test
Stage: report
Changes
3
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+43
-0
43 additions, 0 deletions
.gitlab-ci.yml
eraser-base/build.gradle
+8
-0
8 additions, 0 deletions
eraser-base/build.gradle
print-coverage.py
+6
-0
6 additions, 0 deletions
print-coverage.py
with
57 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
43
−
0
View file @
70778f91
before_script
:
-
pip install --user untangle
stages
:
-
build
-
test
-
report
build
:
stage
:
build
script
:
-
./gradlew --console=plain assemble
retry
:
2
when
:
on_success
test
:
stage
:
test
script
:
-
./gradlew --continue --console=plain test jacocoTestReport
retry
:
2
when
:
on_success
artifacts
:
when
:
always
# paths:
# - $TEST_REPORTS
# - $JACOCO_DATA1
# - $JACOCO_DATA2
coverage
:
image
:
python:3.7.1-stretch
stage
:
report
dependencies
:
-
test
script
:
# - ./gradlew --continue --console=plain -x test
-
python2 print-coverage.py
coverage
:
"
/Covered
(
\\
d{1,3}
\\
.
\\
d{2}%)
of
instructions
for
all
projects
\\
./"
allow_failure
:
true
when
:
on_success
artifacts
:
when
:
always
# paths:
# - $COVERAGE_REPORTS
This diff is collapsed.
Click to expand it.
eraser-base/build.gradle
+
8
−
0
View file @
70778f91
...
...
@@ -4,6 +4,7 @@ repositories {
apply
plugin:
'jastadd'
apply
plugin:
'application'
apply
plugin:
'jacoco'
dependencies
{
compile
group:
'com.fasterxml.jackson.core'
,
name:
'jackson-databind'
,
version:
'2.8.8.1'
...
...
@@ -31,6 +32,13 @@ run {
}
}
jacocoTestReport
{
reports
{
xml
.
enabled
true
html
.
enabled
false
}
}
task
preprocess
(
type:
JavaExec
)
{
group
=
'Build'
main
=
"-jar"
...
...
This diff is collapsed.
Click to expand it.
print-coverage.py
0 → 100644
+
6
−
0
View file @
70778f91
import
untangle
obj
=
untangle
.
parse
(
'
eraser-base/build/reports/jacoco/test/jacocoTestReport.xml
'
)
instructions
=
[
o
for
o
in
obj
.
report
.
counter
if
o
[
'
type
'
]
==
'
INSTRUCTION
'
][
0
]
missed
,
covered
=
int
(
instructions
[
'
missed
'
]),
int
(
instructions
[
'
covered
'
])
# print missed / (missed + covered)
print
'
Covered %.2f%% of instructions for all projects.
'
%
(
missed
*
100.0
/
(
missed
+
covered
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment