Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
use tox (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebRut authored Feb 10, 2021
1 parent f4f3537 commit d87194f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ html/
build/
pygrocy.egg-info/


.tox/
.coverage
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ repos:
rev: 5.7.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
args: ["--profile", "black", "--filter-files"]
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
language: python
python:
- '3.9'
language: minimal
dist: focal

env:
global:
# Doctr deploy key for SebRut/pygrocy
- secure: "YoHepp7ZFuwmdlghnhwT7aczFamnuwTrAuOyXuhxV9bX9eqziurL5K39R04OD5hdPcbNXoVos1YbE4hBGFQpAk6ReiBqqhh+3qDw/HeEpZxRX9dISw+74Nu9kAYXNR8Ab5Zcov85IV3xvTqpawMeBpiXBuJFTbdvZbWhN1jglpR4D9VG//LaNjR/FbCH/41xzpuK3L1mSCQM3jJSSxPU7ZfkWzNvsGj1X///m3la3gR7DL1M4QC9hnzKF6KRNl0kVUuNnK8GhT66ZBGaCVDTqQeDQGTrjsCGuCsQnoydVV2XFwljZ3B6qE27ZqhehlloK2s8/go18zAuj9HpdkTx0RzeUOkxIDp9hAnAys4iGz7Ltk+sx0jGbNsv2Z8oHBgDhv6mu/0UMwD1dL83ZL3L0qWDJfDY3NZSlV0oW9ZPz5ZG8ObnnKKh4vHfp7HUpp/ElYEio7JzQit4FI7gnZRDFEAeH/NvwX8+t0SGXITyyn2U2X5Hz7TUe3laNaDe6Bq59+jebnRdTttuhyoXcMHtjm9HerqRussV+2jyTUf+ktWOFZFjavqUSj6k3iV9yKrgYwfW2+tsaOBZqEHwkRkd5DbNFLvkd0+NEBRfsJV4v51z9QdES3FlPpY/nPqORVkPCLxriCWLf+lTtYi6rtjixvvc4poFFz6WTNILwuOLqrs="
- GROCY_MODE=demo

addons:
apt:
update: true
packages:
- python3.8
- python3
- python3-pip
- python3-setuptools
- python3-wheel
- tox

services:
- docker
Expand All @@ -14,17 +25,18 @@ before_install:
- git clone --branch v3.0.1-8 https://github.com/grocy/grocy-docker.git
- cd grocy-docker
- docker-compose pull
- GROCY_MODE=demo docker-compose up -d
- docker-compose up -d
- curl http://localhost
- cd ..
- pip3 install virtualenv==20.0.23 --force-reinstall

install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install coveralls
- pip3 install -r requirements.txt
- pip3 install -r requirements-dev.txt
- pip3 install coveralls

script:
- coverage run --source=pygrocy setup.py test
- tox
- set -e
- pdoc3 --html pygrocy

Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tzlocal~=2.1
iso8601~=0.1.14
pre-commit
isort
pytest
pytest-cov
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tox]
envlist = py38,py39

[testenv]
passenv = TRAVIS TRAVIS_*
deps =
-rrequirements.txt
-rrequirements-dev.txt
commands = pytest --cov --cov-append

0 comments on commit d87194f

Please sign in to comment.