-
Notifications
You must be signed in to change notification settings - Fork 22
150 lines (150 loc) · 4.19 KB
/
e2e.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
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
150
name: E2E
on:
workflow_dispatch: {}
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
fs:
name: file system
runs-on: ubuntu-latest
services:
duckling:
image: rasa/duckling
ports:
- 8000:8000
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup E2E
uses: ./.github/actions/setup-e2e
- name: Start NLU Server
run: |
./nlu \
--log-level "critical" \
--ducklingURL http://localhost:8000 \
--languageURL http://localhost:3100 \
--modelTransferEnabled \
--port 3200 &
nlu_pid=$!
echo "NLU Server started on pid $nlu_pid"
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '15s'
- name: Run Tests
run: |
yarn e2e --nlu-endpoint http://localhost:3200
db:
name: database
runs-on: ubuntu-latest
services:
duckling:
image: rasa/duckling
ports:
- 8000:8000
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_DB: botpress-nlu-1
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_PORT: 5432
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup E2E
uses: ./.github/actions/setup-e2e
- name: Start NLU Server
run: |
./nlu \
--log-level "critical" \
--ducklingURL http://localhost:8000 \
--languageURL http://localhost:3100 \
--modelTransferEnabled \
--port 3201 \
--dbURL postgres://postgres:postgres@localhost:5432/botpress-nlu-1 & \
nlu_pid=$!
echo "NLU Server started on pid $nlu_pid"
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '15s'
- name: Run Tests
run: |
yarn e2e --nlu-endpoint http://localhost:3201
cluster:
name: cluster
runs-on: ubuntu-latest
services:
duckling:
image: rasa/duckling
ports:
- 8000:8000
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_DB: botpress-nlu-2
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_PORT: 5432
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup E2E
uses: ./.github/actions/setup-e2e
- name: Start First NLU Server on port 3202
run: |
./nlu \
--maxTraining 0 \
--maxLinting 0 \
--log-level "critical" \
--ducklingURL http://localhost:8000 \
--languageURL http://localhost:3100 \
--modelTransferEnabled \
--port 3202 \
--dbURL postgres://postgres:postgres@localhost:5432/botpress-nlu-2 & \
nlu_pid1=$!
echo "NLU Server started on pid $nlu_pid1"
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '5s'
- name: Start Second NLU Server on port 3203
run: |
./nlu \
--log-level "critical" \
--ducklingURL http://localhost:8000 \
--languageURL http://localhost:3100 \
--port 3203 \
--dbURL postgres://postgres:postgres@localhost:5432/botpress-nlu-2 & \
nlu_pid2=$!
echo "NLU Server started on pid $nlu_pid2"
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '15s'
- name: Run Tests
run: |
yarn e2e --nlu-endpoint http://localhost:3202