From a46af418d405d801f148785a701c0efb7102a419 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Wed, 30 May 2018 22:16:08 +0530 Subject: [PATCH] circleci: Add support for Ubuntu Bionic. --- .circleci/config.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06925fcaa6..08604cefbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -138,9 +138,68 @@ jobs: pip install codecov && codecov \ || echo "Error in uploading coverage reports to codecov.io." + "bionic-python-3.6": + docker: + # This is built from tools/circleci/images/bionic/Dockerfile . + - image: gregprice/circleci:bionic-python-1.test + + working_directory: ~/zulip + + steps: + - checkout + + - run: + name: create cache directories + command: | + dirs=(/srv/zulip-{npm,venv}-cache) + sudo mkdir -p "${dirs[@]}" + sudo chown -R circleci "${dirs[@]}" + # Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See + # https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI + redis-server --daemonize yes + + - restore_cache: + keys: + - v1-npm-base.bionic-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }} + - restore_cache: + keys: + - v1-venv-base.bionic-{{ checksum "requirements/thumbor.txt" }}-{{ checksum "requirements/dev.txt" }} + + - run: + name: install dependencies + command: | + sudo apt-get update + sudo apt-get install -y moreutils + rm -f /home/circleci/.gitconfig + mispipe "tools/travis/setup-backend" ts + + - save_cache: + paths: + - /srv/zulip-npm-cache + key: v1-npm-base.bionic-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }} + - save_cache: + paths: + - /srv/zulip-venv-cache + key: v1-venv-base.bionic-{{ checksum "requirements/thumbor.txt" }}-{{ checksum "requirements/dev.txt" }} + + - run: + name: run backend tests + command: | + . /srv/zulip-py3-venv/bin/activate + mispipe ./tools/travis/backend ts + + - run: + name: upload coverage report + command: | + . /srv/zulip-py3-venv/bin/activate + pip install codecov && codecov \ + || echo "Error in uploading coverage reports to codecov.io." + + workflows: version: 2 build: jobs: - "trusty-python-3.4" - "xenial-python-3.5" + - "bionic-python-3.6"