diff options
Diffstat (limited to '.circleci/config.yml')
-rw-r--r-- | .circleci/config.yml | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 67d8ab0e..3be131b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,14 +8,13 @@ workflows: version: 2 test: jobs: - - test-3.6 - - test-3.7 - - test-3.8 + - test-cli + - test-gui jobs: - test-3.6: &test-template + test-cli: docker: - - image: circleci/python:3.6-buster + - image: circleci/python:3.8-buster working_directory: ~/repo @@ -23,42 +22,45 @@ jobs: - checkout - run: - name: Install Qt5 binaries - command: | - sudo apt-get update - sudo apt-get install xvfb libdbus-1-3 libxkbcommon-x11-0 libxkbcommon-x11-dev - cd ~/ - wget https://download.qt.io/official_releases/qt/5.14/5.14.0/qt-opensource-linux-x64-5.14.0.run - chmod +x qt-opensource-linux-x64-5.14.0.run - xvfb-run ./qt-opensource-linux-x64-5.14.0.run --script ~/repo/.circleci/qt-installer-script.js --platform minimal --verbose - - - run: name: Install dependencies command: | sudo apt-get update - sudo apt-get install -y python3-pip xvfb tor obfs4proxy - sudo pip3 install poetry flake8 + sudo apt-get -y install tor obfs4proxy + pip install poetry + cd ~/repo/cli poetry install - run: - name: Run flake tests + name: Run 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 + cd ~/repo/cli + poetry run pytest -v ./tests + + test-gui: + docker: + - image: circleci/python:3.8-buster + + working_directory: ~/repo + + steps: + - checkout - run: - name: Run unit tests + name: Install dependencies command: | - xvfb-run -s "-screen 0 1280x1024x24" poetry run ./tests/run.sh --rungui - - test-3.7: - <<: *test-template - docker: - - image: circleci/python:3.7-buster + sudo apt-get update + sudo apt-get install -y tor obfs4proxy gcc python3-dev python3-pyside2.qtcore python3-pyside2.qtwidgets python3-pyside2.qtgui + sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev libxcb-render-util0 libxcb-icccm4 libxcb-keysyms1 libxcb-image0 + cd ~/repo/cli + poetry install + poetry build + cp dist/onionshare_cli-*.whl ~/repo/desktop + cd ~/repo/desktop + pip install briefcase pytest pytest-briefcase pytest-faulthandler pytest-qt pytest-xvfb + pip install $(python -c 'import toml; print(" ".join(toml.loads(open("pyproject.toml").read())["tool"]["briefcase"]["app"]["onionshare"]["requires"]))') - test-3.8: - <<: *test-template - docker: - - image: circleci/python:3.8-buster + - run: + name: Run tests + command: | + cd ~/repo/desktop + ./tests/run.sh |