|
1 | 1 | version: 2
|
2 | 2 | jobs:
|
3 | 3 | build:
|
4 |
| - docker: |
5 |
| - - image: continuumio/miniconda3:4.5.12 |
6 |
| - - image: mongo:3.6.8-stretch |
7 |
| - environment: |
8 |
| - MONGO_INITDB_ROOT_USERNAME: admin |
9 |
| - MONGO_INITDB_ROOT_PASSWORD: foobar |
10 |
| - command: |
11 |
| - - --auth |
12 |
| - - --oplogSize |
13 |
| - - '100' |
14 |
| -# - image: rabbitmq |
| 4 | + working_directory: /home/circleci |
| 5 | + machine: |
| 6 | + image: ubuntu-1604:201903-01 |
15 | 7 | steps:
|
16 |
| - - checkout |
| 8 | + - checkout: |
| 9 | + path: /home/circleci/omegaml-ce |
17 | 10 | - run:
|
18 |
| - name: Install system packages |
| 11 | + name: Install Miniconda |
19 | 12 | command: |
|
20 |
| - apt-get -q update |
21 |
| - apt-get -q -y install make |
22 |
| - - restore_cache: |
23 |
| - key: v1-omegaml-condaenv-{{ checksum "conda-requirements.txt" }}-{{ checksum |
24 |
| - "pip-requirements.txt" }} |
| 13 | + curl -O --silent --show-error https://repo.anaconda.com/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh |
| 14 | + sh Miniconda3-4.5.12-Linux-x86_64.sh -b |
25 | 15 | - run:
|
26 | 16 | name: Create Python environment
|
27 | 17 | command: |
|
28 |
| - if [ ! -d /opt/conda/envs/omenv ] |
29 |
| - then |
30 |
| - conda create --offline -q -y -n omenv |
31 |
| - conda activate omenv |
32 |
| - conda install -q -y --file conda-requirements.txt |
33 |
| - pip install -q -r pip-requirements.txt |
34 |
| - fi |
| 18 | + source miniconda3/etc/profile.d/conda.sh |
| 19 | + conda create --offline -q -y -n omenv |
| 20 | + conda activate omenv |
| 21 | + cd omegaml-ce |
| 22 | + conda install -q -y --file conda-requirements.txt |
| 23 | + pip install -q -r pip-requirements.txt |
35 | 24 | shell: /bin/bash -l -eo pipefail
|
36 |
| - - save_cache: |
37 |
| - key: v1-omegaml-condaenv-{{ checksum "conda-requirements.txt" }}-{{ checksum |
38 |
| - "pip-requirements.txt" }} |
39 |
| - paths: |
40 |
| - - /opt/conda/envs/omenv |
41 |
| - - /root/.conda |
42 |
| -# - run: |
43 |
| -# name: Start processes |
44 |
| -# command: | |
45 |
| -# conda activate omenv |
46 |
| -# honcho start worker notebook restapi |
47 |
| -# shell: /bin/bash -l -eo pipefail |
48 |
| -# background: true |
49 |
| -# environment: |
50 |
| -# C_FORCE_ROOT: true |
51 | 25 | - run:
|
52 | 26 | name: Run unit tests
|
53 | 27 | command: |
|
| 28 | + source miniconda3/etc/profile.d/conda.sh |
54 | 29 | conda activate omenv
|
| 30 | + cd omegaml-ce |
| 31 | + docker-compose -f docker-compose-dev.yml up -d |
| 32 | + echo "Waiting..." |
| 33 | + sleep 10 |
| 34 | + docker exec -i $(docker ps -qf name=mongo) mongo < scripts/mongoinit.js |
55 | 35 | make test
|
| 36 | + docker-compose down --remove-orphans |
| 37 | + shell: /bin/bash -l -eo pipefail |
| 38 | + - run: |
| 39 | + name: Run live tests |
| 40 | + command: | |
| 41 | + source miniconda3/etc/profile.d/conda.sh |
| 42 | + conda activate omenv |
| 43 | + cd omegaml-ce |
| 44 | + LIVETEST_BEHAVE_EXTRA_OPTS="--tags ~tfestimator --tags ~tfkeras" make livetest |
56 | 45 | shell: /bin/bash -l -eo pipefail
|
57 | 46 | workflows:
|
58 | 47 | version: 2
|
|
0 commit comments