Skip to content

Commit

Permalink
Publishing on github
Browse files Browse the repository at this point in the history
use
 - Travic-CI.org for CI
 - SonarCloud.io for code validation
 - codecov.io for coverage
 - pypi.python.org for package publishing
  • Loading branch information
vgrebenschikov committed May 28, 2020
1 parent b6a12ab commit 5d55937
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 116 deletions.
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
dist: bionic
language: python
matrix:
include:
- os: linux
python: 3.6
sudo: true
env: BUILD=PYPI
- os: linux
python: 3.7
sudo: true
- os: linux
python: 3.8
sudo: true
install:
- pip install -r requirements/dev.txt
- pip install -r requirements/test.txt
- pip install pytest-cov
script:
- flake8
- python setup.py test
- sonar-scanner
after_success:
- bash <(curl -s https://codecov.io/bash)
addons:
sonarcloud:
organization: cloudbluesonarcube
token:
secure: SFqO8p9smZgff0tG2OnNzGQ7A0GCPVrkUhtss2+XE268wrikfwKoH85iobVPuI9u/qYM0ZTVujFhLXcBxaQhO+d1WHBkh1t9+z9UfLC3Ke+JJaNm1vnnI4L8u82s7xYcpZzu42zY6f9vdfe8M4P9xyDWKDaBY0uUkFv7EW21hFa0OKJ9Wb26L313dFNqawy/mEOLCiakBDUzmAK96M+i+C/m8bhGq1rQ/pst4uc53UNjJhGRz/OvdV1edceGW5qEpP+W6DeqxG5Ht4Y8TlZFUFS8xSbXU2J+ApfgZ8pqTNBYiSKy+QT1Z1dXEmB1tzuBJRVC0rdSZ5wCHvOrQN+gf8TU3ifUdoh2KztNuwRiRwoJY9K8XAVtGdewYHUBdUR+GWR0Q41kv6kAXaO1hnqcrwS3UqhiGqeqA6K9kvqgHOjDY6gpCEDpucypaQMijcUE3F0bHiiElnm6tLfQvnB6Is8ppYH2sQPQ1YePDTovUo1mcfKqvRUY362FvFaPQrgyJziSkqmcGmNTuQlC6foWX6qQaZUDvSTyWX2/C0Gc4QFyHq/xjRR3NrUnF3DvEjr439z29baQYX0OmQIZkU2WysE4ko94qmwOgV/Bxq7NNcrsyFgZEPbpeR1+8pLCw/d/Mespm9YTseZuBhX+lFKIMqzZIRDDiHJ9RzsjlH+2804=
deploy:
skip_cleanup: true
skip_existing: true
provider: pypi
user: "__token__"
password:
secure: qW4MPrXOg19JlL+zhU43r8ZtNiFfNxACFSlcv5puCffiBpJOWoKES9ytTCCWLcxo0gepo8Y8tORVgyAGC0gnPrw5vzge0QjFYv+kWHOGAns7qW1xJ0npGiTf7lyTgKUOJLuH3E3X6JEdDJfKXUjeLbozaqz1bTl3yivMAZpTwOG9crlMkNM6vCaIKxuPI6cfcWd7M0P4ylKYHeDVGUSNaY2ckXBLJP0HfwR7CYvn2RsxNQDtiISULZPz8THOiG//kv/RYwOYad+9S7F4fMv9jFjMZtWMUiKOxp/t5eG9U8GOfpEr84sCSR+MtiQWA7PbvuBG12GXqe0xqpbvYQx0bLEO6up9MA3uTwVwKpKf8eYNVs9A+vzyxfX8oYs6eXgRS6ESqWB+03yo8dbtt8E7oGyzknI5oEqJOgRmxSLrkI7VklzPyj98y/d53ein6ExmWt1noJpEcoJ1FkWRlDiTBFQSU42kgTCXl2Lm2mUg9YAtF42dHDoKQ86Y9qcom+B7xQhoCC701RBweE1CPGo/lW8k7YKQ6vi4KFK4qWwn6dWfAe322t2V08z+tWnrHKtMJKLvQHw/QdH1jtyZ+4U9cA98aHxhtW1XITi/A2Bi2Wlh81k5aCsIpZqvrSVEt6PNf3//BVZdVePSxabFv9wZDNIGyBvSndA+glwT5wql80g=
on:
tags: true
all_branches: true
distributions: sdist
condition: "$BUILD = PYPI"
107 changes: 0 additions & 107 deletions Jenkinsfile

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Django CQRS
===========
![pyversions](https://img.shields.io/pypi/pyversions/django-cqrs.svg) [![PyPi Status](https://img.shields.io/pypi/v/django-cqrs.svg)](https://pypi.org/project/django-cqrs/) [![codecov](https://codecov.io/gh/cloudblue/django-cqrs/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudblue/django-cqrs) [![Build Status](https://travis-ci.org/cloudblue/django-cqrs.svg?branch=master)](https://travis-ci.org/cloudblue/django-cqrs) [![PyPI status](https://img.shields.io/pypi/status/django-cqrs.svg)](https://pypi.python.org/pypi/django-cqrs/) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=django-cqrs&metric=alert_status)](https://sonarcloud.io/dashboard?id=django-cqrs)

`django-cqrs` is an Django application, that implements CQRS data synchronisation between several Django microservices.

Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def read_file(name):
url='https://connect.cloud.im',
description='Django CQRS data synchronisation',
long_description=read_file('README.md'),
license=read_file('LICENSE'),
long_description_content_type='text/markdown',
license='Apache License, Version 2.0',

python_requires='>=3.5',
python_requires='>=3.6',
zip_safe=True,
packages=find_packages(),
include_package_data=True,
Expand All @@ -28,12 +29,14 @@ def read_file(name):

keywords='django cqrs sql mixin amqp',
classifiers=[
'Development Status :: 2',
'Development Status :: 5 - Production/Stable',
'Framework :: Django :: 1.11',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Communications',
'Topic :: Database',
]
Expand Down
7 changes: 3 additions & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sonar.host.url=http://sonar.rnd.host

sonar.projectKey=connect:library:django-cqrs
sonar.projectName=Connect Django CQRS
sonar.projectKey=django-cqrs
sonar.projectName=Django CQRS
sonar.organization=cloudbluesonarcube

sonar.language=py

Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands/test_bulk_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def tests_dumps_several_rows(capsys):
assert len(lines) == 3
assert lines[0].strip() == 'author'

line_with_publisher = next(l for l in lines[1:] if '"name":"publisher"' in l)
line_with_publisher = next(ln for ln in lines[1:] if '"name":"publisher"' in ln)
assert author.to_cqrs_dict() == ujson.loads(line_with_publisher)

captured = capsys.readouterr()
Expand Down

0 comments on commit 5d55937

Please sign in to comment.