-
Notifications
You must be signed in to change notification settings - Fork 1
137 lines (132 loc) · 4.45 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
name: e2e Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
redis:
image: redis
ports:
- 6379:6379
mariadb:
image: mariadb
env:
MARIADB_ROOT_PASSWORD: sola
ports:
- 3306:3306
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run liresolr
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
sudo mkdir /tmp/solr
sudo chown 8983:8983 /tmp/solr
docker run -d -p 8983:8983 -v /tmp/solr:/var/solr \
--network $CONTAINER_NETWORK \
ghcr.io/leslie-wong-h/liresolr:latest solr-precreate cl_0 /opt/solr/server/solr/configsets/liresolr
- name: Install ffmpeg
run: |
sudo apt-get update -y
sudo apt-get install -y ffmpeg --fix-missing
- name: Docker run etcd
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
sudo mkdir /tmp/etcd
docker run -d --name etcd -v /tmp/etcd:/etcd \
--network $CONTAINER_NETWORK \
-e ETCD_AUTO_COMPACTION_MODE=revision \
-e ETCD_AUTO_COMPACTION_RETENTION=1000 \
-e ETCD_QUOTA_BACKEND_BYTES=4294967296 \
quay.io/coreos/etcd:v3.5.5 \
etcd -advertise-client-urls=http://127.0.0.1:2379 \
-listen-client-urls http://0.0.0.0:2379 \
--data-dir /etcd
- name: Docker run minio
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
sudo mkdir /tmp/minio
docker run -d --name minio -v /tmp/minio:/minio_data \
--network $CONTAINER_NETWORK \
-e MINIO_ACCESS_KEY=minioadmin \
-e MINIO_SECRET_KEY=minioadmin \
minio/minio:RELEASE.2022-03-17T06-34-49Z \
minio server /minio_data
- name: Docker run milvus-standalone
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
sudo mkdir /tmp/milvus
docker run -d --name standalone -v /tmp/milvus:/var/lib/milvus \
--network $CONTAINER_NETWORK \
-p 19530:19530 -p 9091:9091 \
-e ETCD_ENDPOINTS=etcd:2379 \
-e MINIO_ADDRESS=minio:9000 \
milvusdb/milvus:v2.2.11 \
milvus run standalone
- name: Docker run searcher
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
docker run -d --name searcher \
--network $CONTAINER_NETWORK \
-p 19531:19531 \
-e TRACE_ALGO=cl \
-e SOLA_SOLR_LIST=http://172.17.0.1:8983/solr/ \
-e SEARCHER_URL=http://172.17.0.1:19531 \
-e MILVUS_URL=172.17.0.1:19530 \
ghcr.io/shotit/shotit-worker-searcher:v0.9.16
- name: Docker run sorter
env:
CONTAINER_NETWORK: ${{ job.container.network }}
run: |
docker run -d --name sorter \
--network $CONTAINER_NETWORK \
-p 19532:19532 \
ghcr.io/shotit/shotit-sorter:v0.9.3
# Sleep for 120 seconds to wait for Milvus Proxy and Searcher ready
- name: Sleep for 120 seconds
run: sleep 120s
shell: bash
- run: yarn install --frozen-lockfile
- run: yarn jest
env:
REDIS_HOST: 127.0.0.1
REDIS_PORT: 6379
SOLA_DB_HOST: 127.0.0.1
SOLA_DB_PORT: 3306
SOLA_DB_USER: root
SOLA_DB_PWD: sola
SOLA_DB_NAME: test
TRACE_ALGO: cl
SOLA_SOLR_LIST: http://127.0.0.1:8983/solr/
SOLA_SOLR_SIZE: 1
TRACE_MEDIA_URL: http://127.0.0.1
TRACE_MEDIA_SALT: TRACE_MEDIA_SALT
SEARCHER_URL: http://172.17.0.1:19531
SORTER_URL: http://172.17.0.1:19532
MILVUS_URL: 172.17.0.1:19530
TRACE_ACCURACY: 0.02
TRACE_API_SALT: YOUR_TRACE_API_SALT
TRACE_API_SECRET: TRACE_API_SECRET
EMAIL_SMTP: smtp.ethereal.email
EMAIL_SMTP_PORT: 587
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests