-
Notifications
You must be signed in to change notification settings - Fork 575
67 lines (60 loc) · 2.32 KB
/
deploy_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
60
61
62
63
64
65
66
67
name: Deploy CI Test
on:
pull_request:
branches:
- master
types: [ labeled ]
jobs:
CI-Deploy-Test:
# Example label: audio_similarity_search/quick_deploy
if: contains(github.event.label.name, 'benchmark') || contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python3.7
uses: actions/setup-python@master
with:
python-version: 3.7
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.7
- name: Conda install RDKit
if: github.event.label.name == 'molecular_similarity_search/quick_deploy'
shell: bash -l {0}
run: |
conda info
conda install -c rdkit rdkit -y
- name: Install pip packeages
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install pytest
pip install gdown
- name: Start Milvus
run: |
wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-rc7/milvus-standalone-docker-compose.yml -O docker-compose.yml
docker-compose up -d
- name: Install libsndfile
if: github.event.label.name == 'audio_similarity_search/quick_deploy'
run: sudo apt-get install -y libsndfile1
- name: Install ffmpeg
if: github.event.label.name == 'video_similarity_search/object_detection' || github.event.label.name == 'video_similarity_search/quick_deploy'
run: sudo apt-get install -y ffmpeg
- name: Start MySQL
if: contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
run: docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
- name: Test main server
if: contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
shell: bash -l {0}
run: |
cd solutions/${{github.event.label.name}}/server
pip install -r requirements.txt
cd src && python -m pytest
- name: Test benchmark
if: github.event.label.name == 'benchmark'
shell: bash -l {0}
run: |
cd benchmark_test/scripts
pip install -r requirements.txt
python -m pytest test_main.py