2018-10-17 01:51:49 -04:00
|
|
|
# Python CircleCI 2.0 configuration file
|
|
|
|
#
|
|
|
|
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
|
|
|
#
|
|
|
|
version: 2
|
2018-11-25 16:20:05 -05:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
|
|
|
- test-3.6
|
|
|
|
- test-3.7
|
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
jobs:
|
2019-10-20 13:15:16 -04:00
|
|
|
test-3.6: &test-template
|
2018-10-17 01:51:49 -04:00
|
|
|
docker:
|
2019-10-20 13:15:16 -04:00
|
|
|
- image: circleci/python:3.6.6
|
2019-01-16 00:54:39 -05:00
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: install dependencies
|
|
|
|
command: |
|
2018-11-25 16:20:05 -05:00
|
|
|
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
|
2018-10-18 02:38:15 -04:00
|
|
|
sudo pip3 install -r install/requirements.txt
|
2018-10-18 02:35:30 -04:00
|
|
|
sudo pip3 install -r install/requirements-tests.txt
|
|
|
|
sudo pip3 install pytest-cov flake8
|
2018-10-17 01:51:49 -04:00
|
|
|
|
|
|
|
# run tests!
|
|
|
|
- run:
|
2018-10-18 02:38:15 -04:00
|
|
|
name: run flake tests
|
2019-01-16 00:54:39 -05:00
|
|
|
command: |
|
2018-10-17 01:58:05 -04:00
|
|
|
# stop the build if there are Python syntax errors or undefined names
|
|
|
|
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
|
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
|
2018-10-17 01:59:13 -04:00
|
|
|
- run:
|
2018-10-17 01:51:49 -04:00
|
|
|
name: run tests
|
|
|
|
command: |
|
2019-05-22 23:46:23 -04:00
|
|
|
xvfb-run -s "-screen 0 1280x1024x24" pytest --rungui --cov=onionshare --cov=onionshare_gui --cov-report=term-missing -vvv --no-qt-log tests/
|
2018-10-17 01:51:49 -04:00
|
|
|
|
2018-11-25 16:20:05 -05:00
|
|
|
test-3.7:
|
|
|
|
<<: *test-template
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7.1
|