-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (37 loc) · 941 Bytes
/
.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
stages:
- build
- staticAnalysis
- test
# Frontend
frontend:
image: node:14-alpine
stage: build
script:
- cd alpha-built-frontend
- npm install
- npm run build
artifacts:
paths:
- alpha-built-frontend/dist/
# Backend
build-alpha-built-backend:
image: gradle:7.6.1-jdk17
stage: build
script:
- cd alpha-built-backend
- gradle assemble testClasses
checkStyle-alpha-built-backend:
image: gradle:7.6.1-jdk17
stage: staticAnalysis
script:
- cd alpha-built-backend
- gradle checkstyleMain checkStyleTest
allow_failure: false
test-alpha-built-backend:
image: gradle:7.6.1-jdk17
stage: test
script:
- cd alpha-built-backend
- gradle test jacocoTestReport
- if [ -e "build/reports/jacoco/test/html/index.html" ]; then cat build/reports/jacoco/test/html/index.html | grep -Po "Total.*?([0-9]{1,3})%"; else echo "No test report."; fi
coverage: /([0-9]{1,3})%/