2018-10-17 02:51:49 -03:00
|
|
|
# Python CircleCI 2.0 configuration file
|
|
|
|
#
|
|
|
|
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
|
|
|
#
|
|
|
|
version: 2
|
2018-11-25 18:20:05 -03:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
|
|
|
- test-3.7
|
2020-03-22 16:35:26 -03:00
|
|
|
- test-3.8
|
2018-11-25 18:20:05 -03:00
|
|
|
|
2018-10-17 02:51:49 -03:00
|
|
|
jobs:
|
2020-03-22 16:35:26 -03:00
|
|
|
test-3.7: &test-template
|
2018-10-17 02:51:49 -03:00
|
|
|
docker:
|
2020-03-22 16:35:26 -03:00
|
|
|
- image: circleci/python:3.7-buster
|
2019-01-16 02:54:39 -03:00
|
|
|
|
2018-10-17 02:51:49 -03:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: install dependencies
|
|
|
|
command: |
|
2018-11-25 18:20:05 -03:00
|
|
|
sudo apt-get update
|
2020-03-22 16:33:35 -03:00
|
|
|
sudo apt-get install -y python3-pip xvfb
|
|
|
|
sudo pip3 install poetry flake8
|
|
|
|
poetry install
|
2018-10-17 02:51:49 -03:00
|
|
|
|
|
|
|
# run tests!
|
|
|
|
- run:
|
2018-10-18 03:38:15 -03:00
|
|
|
name: run flake tests
|
2019-01-16 02:54:39 -03:00
|
|
|
command: |
|
2018-10-17 02:58:05 -03: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 02:59:13 -03:00
|
|
|
- run:
|
2018-10-17 02:51:49 -03:00
|
|
|
name: run tests
|
|
|
|
command: |
|
2020-03-22 16:33:35 -03:00
|
|
|
xvfb-run -s "-screen 0 1280x1024x24" poetry run pytest --rungui -vvv --no-qt-log tests/
|
2018-10-17 02:51:49 -03:00
|
|
|
|
2020-03-22 16:35:26 -03:00
|
|
|
test-3.8:
|
2018-11-25 18:20:05 -03:00
|
|
|
<<: *test-template
|
|
|
|
docker:
|
2020-03-22 16:35:26 -03:00
|
|
|
- image: circleci/python:3.8-buster
|