-
Notifications
You must be signed in to change notification settings - Fork 9
/
test-pipeline.yaml
149 lines (149 loc) · 4.66 KB
/
test-pipeline.yaml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: b-vsa-ls23-projekt-1
resultsDestination: results
tools:
- name: database
parameters:
url: jdbc:postgresql://localhost:5432/
name: vsa_pr1_${USERNAME}
username: vsa
password: vsa
driver: org.postgresql.Driver
- name: maven
parameters:
output: maven-outputs/test-output.txt
errorOutput: maven-outputs/test-error-output.txt
surefireOutput: surefire-test-reports
surefire: $project$/target/surefire-reports
- name: git
parameters:
token: ${GITHUB_TOKEN}
author: ${GITHUB_TEACHER}
output: $feedback$/git-outputs/git-output.txt
errorOutput: $feedback$/git-outputs/git-error-output.txt
stages:
- name: cloning
type: prep
steps:
- tool: git
steps:
- step: clone
repo: ${URL}.git
target: $project$
isStudentProject: true
- step: clone
repo: https://github.com/Interes-Group/b-vsa-ls23-project1-solution.git
target: tests
- tool: globals
steps:
- step: set
key: tests
value: tests
- name: preparation
type: prep
steps:
- tool: maven
steps:
- step: dependency
dep: "org.postgresql:postgresql:42.5.4"
- step: dependency
dep: "org.eclipse.persistence:eclipselink:2.7.11"
- step: dependency
dep: "org.eclipse.persistence:javax.persistence:2.2.1"
- step: dependency
dep: "org.reflections:reflections:0.10.2"
- step: dependency
dep: "ch.qos.logback:logback-core:1.3.5"
- step: dependency
dep: "ch.qos.logback:logback-classic:1.3.5"
- step: dependency
dep: "org.slf4j:slf4j-api:2.0.4"
- step: dependency
dep: "org.junit.jupiter:junit-jupiter-engine:5.8.2"
scope: test
- step: dependency
dep: "org.junit.jupiter:junit-jupiter-api:5.8.2"
scope: test
- step: plugin
dep: "org.apache.maven.plugins:maven-surefire-plugin:2.22.2"
- tool: database
steps:
- step: property
name: "javax.persistence.jdbc.url"
value: $database.url$$database.name$
- step: property
name: "javax.persistence.jdbc.user"
value: $database.username$
- step: property
name: "javax.persistence.jdbc.password"
value: $database.password$
- step: property
name: "javax.persistence.jdbc.driver"
value: $database.driver$
- step: property
name: "javax.persistence.schema-generation.database.action"
value: drop-and-create
- step: property
name: "eclipselink.target-database"
value: PostgreSQL
- step: property
name: "eclipselink.logging.level"
value: FINE
- step: property
name: "eclipselink.logging.parameters"
value: "true"
- name: tests
type: test
parameters:
points: 15
steps:
- tool: database
steps:
- step: clear
- tool: file
steps:
- step: purge
path: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1
- step: copyDir
source: $tests$/src/test/java/sk/stuba/fei/uim/vsa/pr1
target: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1
- step: copyDir
source: $tests$/src/test/java/sk/stuba/fei/uim/vsa/pr1/utils
target: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1/utils
- tool: maven
steps:
- step: run
goals: "clean compile test"
- step: parseSurefire
- name: bonusTests
type: test
parameters:
points: 3
bonus: true
steps:
- tool: database
steps:
- step: clear
- tool: file
steps:
- step: purge
path: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1
- step: copyDir
source: $tests$/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus
target: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus
- step: copyDir
source: $tests$/src/test/java/sk/stuba/fei/uim/vsa/pr1/utils
target: $project$/src/test/java/sk/stuba/fei/uim/vsa/pr1/utils
- tool: maven
steps:
- step: run
goals: "clean compile test"
- step: parseSurefire
- name: pushFeedback
type: cleanup
steps:
- tool: file
steps:
- step: copyDir
source: $feedback$
target: $resultsDestination$
recursive: true