Skip to content

Commit

Permalink
Merge pull request #40 from real-digital/more-extensive-travis-testing
Browse files Browse the repository at this point in the history
More extensive travis testing
  • Loading branch information
hfjn committed Sep 6, 2019
2 parents 490b505 + b5a9ef6 commit 35a3252
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 13 deletions.
54 changes: 46 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,50 @@ matrix:
python: 3.6
- name: '3.7'
python: 3.7
- name: 'Test install'
python: 3.6
env: []
before_install:
- mkdir -p ~/.esque
- touch ~/.esque/esque.cfg
install: []
script:
- python setup.py sdist
- pip install --no-cache-dir dist/esque-*.tar.gz
- esque --recreate-config --no-verify
- name: 'Test upload'
python: 3.6
env:
- secure: "znXxvfZqJEMKlu1f78uqvdnZh9y0GAzgPbJK5mBiyQxgIAooELcQnyot811fuQ35dwv5WJv19XeyosJPPVZldUmJMZmfLOa+cxBAWonVpNYNdY6iHk8Yyeoy8V43tc8fGlyG90wiw3h3Phefb9arXPCWZTNrrFSDZZGdU8/4isxLvXUENpQlBXsmi91Q755VHIyuNm9JqpAZk5eLatiE/U35SIncuPSZVtC1B1ZIJ0Bhkf9aVNNusWdeXe2B6c2tTI/rWfFDJfHUPswE+tN2Bw04uCJz7CZDjv8gZKPklNK8noeeZGNsE4X0VFnbKBVUjTWQUPpEuIzQ6Zng/ajlSP7+OhBBLMBsHutP96FwlwT7WqU4V/nK7CajU0B+ZVM8TkEvJwxJDt3+26hc/WzyxqXqNR2qcd70vG6SvGC6JosYEZxOzxmHMYWo5Aff+HMq5Is2NrI6x2kAGJEQnGfpg6S0LGBVrye8i1vzuunZGiT0oVgae5PCt+NZrJq4JFFbkV12NcPg8agNU+LOE9fd2YZCcM9ciGr09vCPgV3kID6k5pK92Lq1mVUBWqAdYsEASbUrgHOMcebtBFoMXIzo4z970DmVFeqdHX/QC1Ofp9+JROQiI/6/6UqIme5TWyTsVLrD76lP5oYD4l5xXj5VFpxCPZjaayvuNIn/eDj1/Dc="
before_install:
- pip install devpi-server devpi "pluggy<1,>=0.12.0"
- devpi-server --serverdir=/tmp/devpi --init
- devpi-server --serverdir=/tmp/devpi --start
- scripts/wait-for-it.sh localhost:3141 -t 60
- devpi use http://localhost:3141
- devpi login root --password=
- devpi index -c root/stable bases=root/pypi volatile=True
- mkdir -p ~/.esque
- touch ~/.esque/esque.cfg
install:
- pip install twine
script:
- export VERSION=$(date +"%s")
- echo "__version__ = \"$VERSION\"" > esque/__version__.py
- python setup.py sdist
- twine upload --repository-url http://localhost:3141/root/stable/ dist/esque-*.tar.gz --user root --password ''
- pip install -i http://localhost:3141/root/stable/ --timeout 60 esque==${VERSION}
- esque --recreate-config --no-verify
allow_failures:
- name: '3.8-dev'
python: 3.8-dev

deploy:
provider: pypi
user: real.digital
on:
tags: true
condition: $TRAVIS_PYTHON_VERSION == '3.6'
repo: real-digital/esque
password:
secure: L7lAviuPS2FijT/t01t0SVHuxfl3/6jcSU3anWkcJdWsa9ktujvdJ6QoX0VE+niUyAwnJ6HJUNWloG1EuuRPiaVO+vIU0t39oKtP/3KKGz6zQPme4p0tpgxvPCjxzBxlaj3zs+3KlfqT7ig5EllgLcAkyCmMpvYgpPY8pCsIY/ipZ+zzQvrA9glCQex9LPhdWH7yaHgx9eGM/dQumn9J/+/CtEkbxLpmw/WHRahCgoODFBMQjTQsVleiHZqedx7gQsSD7lqbdsUkBujawdYIrGnBVIjMdqXT7nQPbKmntKf+5GMcPdFaOqgciQYYgIRLixP1JWPoHzTvsmp0Jfmd8/4u4Eh/zLOKjdsdlNk/X2hNYae+YvKXMSwYqY33cDezsIpkvbz+Vfu3Ch97c2pmp3pSTTkcxKMqnoQJ3aqZENveCPOgfb3PSrzwYBKENaFLZ45l9eU1CPgCNNa7oX/CA1+kb1wY6AMCLW4ZxOe4I3EoUpNyn4lOIEkeOsHIB5d9DJvphd5UrFgUdnADzsnAsr38Gq+Haz9YmaXscUIRvQR27HDqCwfsSn9XPkdwImIjzhPrgM5kGXm0UPsf7nGZiYwEuB2fDTji4YneDhCF4aCKzr7Txlo1BtWp5ue6kbjCARBkwgCO/uHkl8AYos/tUmZe6vl6p3kwYf8sl3i9bOs=
- provider: pypi
user: real.digital
on:
tags: true
condition: $TRAVIS_PYTHON_VERSION == '3.6'
repo: real-digital/esque
password:
secure: L7lAviuPS2FijT/t01t0SVHuxfl3/6jcSU3anWkcJdWsa9ktujvdJ6QoX0VE+niUyAwnJ6HJUNWloG1EuuRPiaVO+vIU0t39oKtP/3KKGz6zQPme4p0tpgxvPCjxzBxlaj3zs+3KlfqT7ig5EllgLcAkyCmMpvYgpPY8pCsIY/ipZ+zzQvrA9glCQex9LPhdWH7yaHgx9eGM/dQumn9J/+/CtEkbxLpmw/WHRahCgoODFBMQjTQsVleiHZqedx7gQsSD7lqbdsUkBujawdYIrGnBVIjMdqXT7nQPbKmntKf+5GMcPdFaOqgciQYYgIRLixP1JWPoHzTvsmp0Jfmd8/4u4Eh/zLOKjdsdlNk/X2hNYae+YvKXMSwYqY33cDezsIpkvbz+Vfu3Ch97c2pmp3pSTTkcxKMqnoQJ3aqZENveCPOgfb3PSrzwYBKENaFLZ45l9eU1CPgCNNa7oX/CA1+kb1wY6AMCLW4ZxOe4I3EoUpNyn4lOIEkeOsHIB5d9DJvphd5UrFgUdnADzsnAsr38Gq+Haz9YmaXscUIRvQR27HDqCwfsSn9XPkdwImIjzhPrgM5kGXm0UPsf7nGZiYwEuB2fDTji4YneDhCF4aCKzr7Txlo1BtWp5ue6kbjCARBkwgCO/uHkl8AYos/tUmZe6vl6p3kwYf8sl3i9bOs=
15 changes: 11 additions & 4 deletions esque/cli/commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pathlib
import time
from pathlib import Path
from shutil import copyfile
from time import sleep

import click
Expand All @@ -22,16 +23,22 @@
)
from esque.clients import FileConsumer, FileProducer, AvroFileProducer, AvroFileConsumer, PingConsumer, PingProducer
from esque.cluster import Cluster
from esque.config import PING_TOPIC, Config, PING_GROUP_ID
from esque.config import PING_TOPIC, Config, PING_GROUP_ID, config_dir, sample_config_path, config_path
from esque.consumergroup import ConsumerGroupController
from esque.topic import Topic
from esque.errors import ConsumerGroupDoesNotExistException, ContextNotDefinedException, TopicAlreadyExistsException


@click.group(help="(Kafka-)esque.")
@click.group(help="esque - an operational kafka tool.", invoke_without_command=True)
@click.option("--recreate-config", is_flag=True, default=False, help="Overwrites the config with the sample config.")
@no_verify_option
@version_option(__version__)
def esque():
pass
@pass_state
def esque(state, recreate_config: bool):
if recreate_config:
config_dir().mkdir(exist_ok=True)
if ensure_approval(f"Should the current config in {config_dir()} get replaced?", no_verify=state.no_verify):
copyfile(sample_config_path().as_posix(), config_path())


@esque.group(help="Get a quick overview of different resources.")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run(self):
setup(
name="esque",
version=about["__version__"],
description="A usable kafka tool.",
description="esque - an operational kafka tool.",
keywords="kafka commandline apache",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 35a3252

Please sign in to comment.