-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
95 lines (89 loc) · 2.01 KB
/
.gitlab-ci.yml
File metadata and controls
95 lines (89 loc) · 2.01 KB
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
stages:
- test
- e2e
default:
# Configs here are specific to SHIP GitLab CI.
tags:
- cstack
- no_root
test-frontend:
stage: test
image: node:20-alpine
before_script:
- cd ./todo-frontend && npm install
script:
- npm run test
cache:
key:
files:
- todo-frontend/package-lock.json
paths:
- todo-frontend/node_modules
test-backend-js:
stage: test
image: node:20-alpine
before_script:
- cd ./todo-backend/todo-app-js
- npm install
script:
- npm run test
cache:
key:
files:
- todo-backend/todo-app-js/package-lock.json
paths:
- todo-backend/todo-app-js/node_modules
test-backend-python:
stage: test
image: python:3-slim
before_script:
- cd ./todo-backend/todo-app-python
- pip install -r requirements.txt
script:
- /tmp/.local/bin/pytest --disable-warnings
cache:
key:
files:
- todo-backend/todo-app-python/requirements.txt
paths:
- /tmp/.local/bin
test-backend-java:
stage: test
image: mcr.microsoft.com/openjdk/jdk:21-ubuntu
before_script:
- cd ./todo-backend/todo-app-java
- export GRADLE_USER_HOME=`pwd`/.gradle
script:
- ./gradlew test
cache:
paths:
- todo-backend/todo-app-java/.gradle/wrapper
- todo-backend/todo-app-java/.gradle/caches
test-e2e-js:
stage: e2e
image: mcr.microsoft.com/playwright:v1.47.2-jammy
needs:
- test-frontend
- test-backend-js
variables:
DEBUG: pw:webserver
before_script:
- cd ./todo-frontend && npm install && cd ../todo-backend/todo-app-js && npm install && cd ../../e2e/js && npm install
script:
- npm run e2e
cache:
- key:
files:
- todo-frontend/package-lock.json
paths:
- todo-frontend/node_modules
- key:
files:
- todo-backend/todo-app-js/package-lock.json
paths:
- todo-backend/todo-app-js/node_modules
- key:
files:
- e2e/js/package-lock.json
paths:
- e2e/js/node_modules