onionshare/.circleci/config.yml

46 lines
1.4 KiB
YAML
Raw Normal View History

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
jobs:
build:
branches:
only:
- fix_tor_tests
2018-10-17 01:51:49 -04:00
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.1
working_directory: ~/repo
steps:
- checkout
- run:
name: install dependencies
command: |
2018-10-17 01:58:05 -04:00
sudo apt-get update && sudo apt-get install python3-pyqt5
2018-10-17 01:51:49 -04:00
python3 -m venv venv
. venv/bin/activate
2018-10-17 01:58:05 -04:00
pip install -r install/requirements.txt
pip install -r install/requirements-tests.txt
pip install pytest-cov flake8
2018-10-17 01:51:49 -04:00
pip install -r install/requirements-tests.txt
# run tests!
- run:
2018-10-17 01:58:05 -04:00
name: run flask tests
command: |
# 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:51:49 -04:00
name: run tests
command: |
. venv/bin/activate
xvfb-run pytest --cov=onionshare --cov=onionshare_gui --cov-report=term-missing -vvv tests/