onionshare/.circleci/config.yml

62 lines
1.5 KiB
YAML
Raw Normal View History

# 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
workflows:
version: 2
test:
jobs:
- test-cli
- test-gui
2018-10-17 01:51:49 -04:00
jobs:
test-cli:
2018-10-17 01:51:49 -04:00
docker:
- 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:
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:
name: Run tests
2018-10-17 01:51:49 -04:00
command: |
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:
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:
name: Run tests
2018-10-17 01:51:49 -04:00
command: |
cd ~/repo/desktop
xvfb-run ./tests/run.sh