2020-03-22 16:33:32 -07: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 16:51:49 +11:00
|
|
|
version: 2
|
2018-11-26 08:20:05 +11:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
2020-03-22 17:10:15 -07:00
|
|
|
- test-3.6
|
2018-11-26 08:20:05 +11:00
|
|
|
- test-3.7
|
2020-03-22 12:35:26 -07:00
|
|
|
- test-3.8
|
2018-11-26 08:20:05 +11:00
|
|
|
|
2018-10-17 16:51:49 +11:00
|
|
|
jobs:
|
2020-03-22 17:10:15 -07:00
|
|
|
test-3.6: &test-template
|
2018-10-17 16:51:49 +11:00
|
|
|
docker:
|
2020-03-22 17:10:15 -07:00
|
|
|
- image: circleci/python:3.6-buster
|
2019-01-15 21:54:39 -08:00
|
|
|
|
2018-10-17 16:51:49 +11:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2020-03-22 15:32:25 -07:00
|
|
|
- run:
|
2020-03-22 16:01:23 -07:00
|
|
|
name: Install Qt5 binaries
|
2020-03-22 15:32:25 -07:00
|
|
|
command: |
|
2020-03-22 16:28:59 -07:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install xvfb libdbus-1-3 libxkbcommon-x11-0 libxkbcommon-x11-dev
|
2020-03-22 16:01:23 -07:00
|
|
|
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
|
2020-03-22 16:28:59 -07:00
|
|
|
xvfb-run ./qt-opensource-linux-x64-5.14.0.run --script ~/repo/.circleci/qt-installer-script.js --platform minimal --verbose
|
2020-03-22 15:32:25 -07:00
|
|
|
|
2018-10-17 16:51:49 +11:00
|
|
|
- run:
|
2020-03-22 16:01:23 -07:00
|
|
|
name: Install dependencies
|
2018-10-17 16:51:49 +11:00
|
|
|
command: |
|
2018-11-26 08:20:05 +11:00
|
|
|
sudo apt-get update
|
2020-04-06 21:19:17 -07:00
|
|
|
sudo apt-get install -y python3-pip xvfb tor obfs4proxy
|
2020-03-22 12:33:35 -07:00
|
|
|
sudo pip3 install poetry flake8
|
|
|
|
poetry install
|
2018-10-17 16:51:49 +11:00
|
|
|
|
|
|
|
- run:
|
2020-03-22 16:33:32 -07:00
|
|
|
name: Run flake tests
|
2019-01-15 21:54:39 -08:00
|
|
|
command: |
|
2018-10-17 16:58:05 +11: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 16:59:13 +11:00
|
|
|
- run:
|
2020-03-22 16:33:32 -07:00
|
|
|
name: Run unit tests
|
2018-10-17 16:51:49 +11:00
|
|
|
command: |
|
2020-04-02 04:19:50 +05:30
|
|
|
xvfb-run -s "-screen 0 1280x1024x24" poetry run ./tests/run.sh --rungui
|
2018-10-17 16:51:49 +11:00
|
|
|
|
2020-03-22 17:10:15 -07:00
|
|
|
test-3.7:
|
|
|
|
<<: *test-template
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7-buster
|
|
|
|
|
2020-03-22 12:35:26 -07:00
|
|
|
test-3.8:
|
2018-11-26 08:20:05 +11:00
|
|
|
<<: *test-template
|
|
|
|
docker:
|
2020-03-22 12:35:26 -07:00
|
|
|
- image: circleci/python:3.8-buster
|