Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Merge branch 'drone'
Browse files Browse the repository at this point in the history
* drone:
  Fix types for setup.py
  Add types-setuptools package
  Add types-requests package
  Update badge to drone
  Add drone config
  • Loading branch information
albertyw committed Mar 18, 2022
2 parents 1f8892d + 692e654 commit 4b2bb83
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .drone.yml
@@ -0,0 +1,45 @@
kind: pipeline
type: docker
name: test

volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc

steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags

- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- pip install -r requirements-test.txt
- python setup.py develop
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- coverage run -m unittest
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 0727323f34a2cf70cccd3efb0a94699f993ab495b138b7010f72f6bbfcbd6768

- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag
6 changes: 3 additions & 3 deletions README.rst
Expand Up @@ -4,7 +4,7 @@ python-mailgun2
|PyPI|
|Python Version|

|Codeship Status for albertyw/python-mailgun2|
|Build Status|
|Code Climate|
|Code Climate Test Coverage|
|Dependency Status|
Expand Down Expand Up @@ -81,8 +81,8 @@ Distributing
.. |PyPI| image:: https://img.shields.io/pypi/v/mailgun2.svg
:target: https://github.com/albertyw/python-mailgun2
.. |Python Version| image:: https://img.shields.io/pypi/pyversions/mailgun2.svg
.. |Codeship Status for albertyw/python-mailgun2| image:: https://codeship.com/projects/ce6c4f80-c4de-0133-efb5-62b97b21679d/status?branch=master
:target: https://codeship.com/projects/138455
.. |Build Status| image:: https://drone.albertyw.com/api/badges/albertyw/python-mailgun2/status.svg
:target: https://drone.albertyw.com/albertyw/python-mailgun2
.. |Code Climate| image:: https://codeclimate.com/github/albertyw/python-mailgun2/badges/gpa.svg
:target: https://codeclimate.com/github/albertyw/python-mailgun2
.. |Code Climate Test Coverage| image:: https://codeclimate.com/github/albertyw/python-mailgun2/badges/coverage.svg
Expand Down
4 changes: 4 additions & 0 deletions requirements-test.txt
@@ -1,4 +1,8 @@
# Testing
coverage==6.3.2 # Test coverage
flake8==4.0.1 # Python linting

# Types
mypy==0.941 # Static typing
types-requests==2.27.13 # Type annotations for requests package
types-setuptools==57.4.11 # Type annotations for setuptools package
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -4,14 +4,15 @@
from setuptools import setup, find_packages
from codecs import open
from os import path
from typing import Dict


# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

about = {}
about: Dict[str, str] = {}
with open(path.join(here, 'mailgun2', '__version__.py')) as f:
exec(f.read(), about)

Expand Down

0 comments on commit 4b2bb83

Please sign in to comment.