Skip to content

Commit 10b0ff4

Browse files
thdls55miraculixx
authored andcommitted
Add Livetest step to CircleCI configuration. (#37)
* Add Livetest step to CircleCI configuration. Completely disable Python env caching. (Caching was not a good idea, because `requirements` files do not pin the version of every recursive dependency. Not a loss, because build speedup was insignificant.) Switch to machine executor. * Build script should not swallow test failures * Exclude @tfkeras, @tfestimator during CI * CTrigger build
1 parent fb735ab commit 10b0ff4

File tree

2 files changed

+32
-41
lines changed

2 files changed

+32
-41
lines changed

.circleci/config.yml

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,47 @@
11
version: 2
22
jobs:
33
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
157
steps:
16-
- checkout
8+
- checkout:
9+
path: /home/circleci/omegaml-ce
1710
- run:
18-
name: Install system packages
11+
name: Install Miniconda
1912
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
2515
- run:
2616
name: Create Python environment
2717
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
3524
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
5125
- run:
5226
name: Run unit tests
5327
command: |
28+
source miniconda3/etc/profile.d/conda.sh
5429
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
5535
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
5645
shell: /bin/bash -l -eo pipefail
5746
workflows:
5847
version: 2

scripts/livetest.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ fi
6565
echo "giving the services time to spin up"
6666
countdown 30
6767
# actually run the livetest
68-
docker run -p $chrome_debug_port -e CHROME_HEADLESS=1 -e CHROME_SCREENSHOTS=/tmp/screenshots -v /tmp/screenshots:/tmp/screenshots $docker_network $docker_env $docker_image behave --no-capture $behave_features
68+
docker run -p $chrome_debug_port -e CHROME_HEADLESS=1 -e CHROME_SCREENSHOTS=/tmp/screenshots -v /tmp/screenshots:/tmp/screenshots $docker_network $docker_env $docker_image behave --no-capture $behave_features $LIVETEST_BEHAVE_EXTRA_OPTS
69+
success=$?
6970
rm -f $script_dir/livetest/packages/*whl
7071
docker-compose stop
72+
exit $success

0 commit comments

Comments
 (0)