File tree Expand file tree Collapse file tree 3 files changed +36
-25
lines changed Expand file tree Collapse file tree 3 files changed +36
-25
lines changed Original file line number Diff line number Diff line change 21
21
steps :
22
22
- uses : actions/checkout@v3
23
23
24
+ - name : Start db docker containers
25
+ run : |
26
+ docker-compose -f test-db-docker-compose.yml up -d
27
+ sleep 10 # wait for database to be ready
28
+
24
29
- name : Use Node.js ${{ matrix.node }}
25
30
uses : actions/setup-node@v3
26
31
with :
@@ -37,12 +42,14 @@ jobs:
37
42
38
43
- run : npm test
39
44
40
- - name : Prepear docker containers for integration tests
41
- run : |
42
- docker-compose -f test-docker-compose.yml up -d
43
- sleep 10 # wait for database to be ready
45
+ # - name: Prepearing api docker container for integration tests
46
+ # run: |
47
+ # docker-compose -f test-api -docker-compose.yml up -d
48
+ # sleep 2 # wait for api to be ready
44
49
45
50
- name : Client test
46
51
run : |
52
+ node server.js&
53
+ sleep 2 # wait for api to be ready
54
+ node test/system.js
47
55
node --test test/client.js
48
- node --test test/system.js
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ api-example :
5
+ build :
6
+ context : .
7
+ dockerfile : Dockerfile
8
+ container_name : api-example
9
+ environment :
10
+ - DB_HOST=pg-example
11
+ - REDIS_HOST=redis-example
12
+ - REDIS_PORT=6379
13
+ volumes :
14
+ - ./application:/usr/server/application
15
+ ports :
16
+ - 127.0.0.1:8000:8000
17
+ - 127.0.0.1:8001:8001
18
+ - 127.0.0.1:8002:8002
19
+ restart : always
20
+
21
+ networks :
22
+ default :
23
+ name : api-example-network
24
+ external : true
Original file line number Diff line number Diff line change @@ -22,26 +22,6 @@ services:
22
22
- 127.0.0.1:6379:6379
23
23
restart : always
24
24
25
- api-example :
26
- build :
27
- context : .
28
- dockerfile : Dockerfile
29
- container_name : api-example
30
- environment :
31
- - DB_HOST=pg-example
32
- - REDIS_HOST=redis-example
33
- - REDIS_PORT=6379
34
- volumes :
35
- - ./application:/usr/server/application
36
- depends_on :
37
- - pg-example
38
- - redis-example
39
- ports :
40
- - 127.0.0.1:8000:8000
41
- - 127.0.0.1:8001:8001
42
- - 127.0.0.1:8002:8002
43
- restart : always
44
-
45
25
networks :
46
26
default :
47
27
name : api-example-network
You can’t perform that action at this time.
0 commit comments