-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
97 lines (91 loc) · 2.2 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
image: dukedesigncoach/testfx-runner
stages:
- analyze
- validate
- test
- report
- notify
checkstyle_analysis:
stage: validate
needs: [ ]
script:
- mvn -version
- mvn -U validate
sonar_analysis:
stage: analyze
needs: [ ]
script:
- java -version
- mvn -version
- |
mvn -X sonar:sonar \
-Dsonar.host.url=http://coursework.cs.duke.edu:9000 \
-Dsonar.java.binaries=. \
-Dsonar.exclusions=**/*.xml,**/*.css,test/**
tags:
- sonarqube
only:
- master
unit_testing:
stage: test
needs:
- checkstyle_analysis
before_script:
- yum install -y fontconfig dejavu-sans-fonts dejavu-serif-fonts
- curl -L -O https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.tar.gz
- tar -xzvf Hack-v3.003-ttf.tar.gz
- mkdir ~/.fonts
- mv ttf/Hack-Regular.ttf ~/.fonts/Hack-Regular.ttf
- mv ttf/Hack-Italic.ttf ~/.fonts/Hack-Italic.ttf
- mv ttf/Hack-Bold.ttf ~/.fonts/Hack-Bold.ttf
- mv ttf/Hack-BoldItalic.ttf ~/.fonts/Hack-BoldItalic.ttf
- fc-cache -f -v
- yum install -y pango
script:
- |
mvn -U clean install site \
-Djava.awt.headless=true \
-Dtestfx.headless=true \
-Dtestfx.robot=glass \
-Dembedded=monocle \
-Dglass.platform=Monocle \
-Dprism.order=sw \
-Dprism.fontdir=/usr/share/fonts \
-Dtestfx.setup.timeout=2500 \
-Dheadless.geometry=1600x1200
- cat target/site/jacoco/index.html
artifacts:
paths:
- target/site/*
- "**/target/surefire-reports/TEST-*.xml"
coverage_report:
stage: report
image: haynes/jacoco2cobertura:1.0.4
needs:
- unit_testing
dependencies:
- unit_testing
script:
- 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src > cobertura.xml'
- 'python /opt/source2filename.py cobertura.xml'
artifacts:
reports:
cobertura: cobertura.xml
junit:
- "**/target/surefire-reports/TEST-*.xml"
pages:
stage: report
needs:
- unit_testing
dependencies:
- unit_testing
script:
- mkdir .public
- cp -r target/site .public
- mv .public public
artifacts:
paths:
- public
only:
- master
- main