From b1245dbba0d6cfa6663a2b3c2dca432733149407 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Mon, 26 Nov 2018 08:20:05 +1100 Subject: [PATCH] Run tests on multiple python versions in CircleCI --- .circleci/config.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b8758353..70fa3b7c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,12 +3,18 @@ # Check https://circleci.com/docs/2.0/language-python/ for more details # version: 2 +workflows: + version: 2 + test: + jobs: + - test-3.5 + - test-3.6 + - test-3.7 + jobs: - build: + test-3.5: &test-template docker: - # specify the version you desire here - # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:3.6.6 + - image: circleci/python:3.5.6 working_directory: ~/repo @@ -18,7 +24,8 @@ jobs: - run: name: install dependencies command: | - sudo apt-get update && sudo apt-get install -y python3-pip python3-flask python3-stem python3-pyqt5 python3-cryptography python3-crypto python3-nacl python3-socks python3-stdeb python3-all python-nautilus xvfb obfs4proxy + sudo apt-get update + sudo apt-get install -y python3-pip python3-flask python3-stem python3-pyqt5 python3-crypto python3-socks python3-stdeb python3-all python-nautilus xvfb obfs4proxy sudo pip3 install -r install/requirements.txt sudo pip3 install -r install/requirements-tests.txt sudo pip3 install pytest-cov flake8 @@ -37,3 +44,12 @@ jobs: command: | xvfb-run pytest --cov=onionshare --cov=onionshare_gui --cov-report=term-missing -vvv tests/ + test-3.6: + <<: *test-template + docker: + - image: circleci/python:3.6.6 + + test-3.7: + <<: *test-template + docker: + - image: circleci/python:3.7.1