Run tests on multiple python versions in CircleCI

This commit is contained in:
Miguel Jacq 2018-11-26 08:20:05 +11:00
parent 5f011e9ed6
commit b1245dbba0
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -3,12 +3,18 @@
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
workflows:
version: 2
test:
jobs:
build:
- test-3.5
- test-3.6
- test-3.7
jobs:
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