-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy path.gitlab-ci.yml
59 lines (54 loc) · 1.04 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
stages:
- build
- setup
- test
- cleanup
build:
tags:
- docker-shell
stage: build
script:
- cd envs/dev
- docker compose build
setup:
tags:
- docker-shell
stage: setup
script:
- cd envs/dev
- docker volume create vol_smart_pgdata && docker volume create vol_smart_data
- docker compose up -d
after_script:
- cd envs/dev
- docker compose stop
test_frontend:
tags:
- docker-shell
script:
- cd envs/dev
- docker compose start
- docker exec -i smart_frontend bash -c "./run_tests.sh"
after_script:
- cd envs/dev
- docker compose stop
test_backend:
tags:
- docker-shell
script:
- cd envs/dev
- docker compose start
- docker exec -i backend bash -c "./run_tests.sh"
after_script:
- cd envs/dev
- docker compose stop
cleanup:
tags:
- docker-shell
stage: cleanup
allow_failure: true
script:
- cd envs/dev
- docker compose down
- docker volume remove vol_smart_pgdata
- docker volume remove vol_smart_data
when: always