2020-03-22 19:33:32 -04:00
|
|
|
# To run the tests, CircleCI needs these environment variables:
|
|
|
|
# QT_EMAIL - email address for a Qt account
|
|
|
|
# QT_PASSWORD - password for a Qt account
|
|
|
|
# (Unfortunately you can't install Qt without logging in.)
|
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
version: 2
|
2018-11-25 16:20:05 -05:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
2020-10-14 23:42:20 -04:00
|
|
|
- test-cli
|
|
|
|
- test-gui
|
2018-11-25 16:20:05 -05:00
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
jobs:
|
2020-10-14 23:42:20 -04:00
|
|
|
test-cli:
|
2018-10-17 01:51:49 -04:00
|
|
|
docker:
|
2020-10-14 23:42:20 -04:00
|
|
|
- image: circleci/python:3.8-buster
|
2019-01-16 00:54:39 -05:00
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2020-03-22 18:32:25 -04:00
|
|
|
- run:
|
2020-10-14 23:44:21 -04:00
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install tor obfs4proxy
|
|
|
|
pip install poetry
|
|
|
|
cd ~/repo/cli
|
|
|
|
poetry install
|
2020-03-22 18:32:25 -04:00
|
|
|
|
2018-10-17 01:51:49 -04:00
|
|
|
- run:
|
2020-10-14 23:42:20 -04:00
|
|
|
name: Run tests
|
2018-10-17 01:51:49 -04:00
|
|
|
command: |
|
2020-10-14 23:42:20 -04:00
|
|
|
cd ~/repo/cli
|
|
|
|
poetry run pytest -v ./tests
|
|
|
|
|
|
|
|
test-gui:
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.8-buster
|
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-10-17 01:51:49 -04:00
|
|
|
|
|
|
|
- run:
|
2020-10-14 23:44:21 -04:00
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y xvfb tor obfs4proxy gcc python3-dev
|
|
|
|
cd ~/repo/desktop
|
|
|
|
pip install briefcase pytest pytest-briefcase pytest-faulthandler pytest-qt
|
|
|
|
pip install $(python -c 'import toml; print(" ".join(toml.loads(open("pyproject.toml").read())["tool"]["briefcase"]["app"]["onionshare"]["requires"]))')
|
2018-10-17 01:58:05 -04:00
|
|
|
|
2018-10-17 01:59:13 -04:00
|
|
|
- run:
|
2020-10-14 23:42:20 -04:00
|
|
|
name: Run tests
|
2018-10-17 01:51:49 -04:00
|
|
|
command: |
|
2020-10-14 23:42:20 -04:00
|
|
|
cd ~/repo/desktop
|
|
|
|
xvfb-run ./tests/run.sh
|