From 2ce920822bd3d5449117b29f142c7a9f165e2868 Mon Sep 17 00:00:00 2001 From: Sergey Petrov Date: Tue, 7 May 2019 18:16:42 +0300 Subject: [PATCH] Migrate to Drone (#78) --- .drone.jsonnet | 52 ++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 36 ------------------------------ README.md | 3 +-- requirements-dev.txt | 1 + 4 files changed, 54 insertions(+), 38 deletions(-) create mode 100644 .drone.jsonnet delete mode 100644 .travis.yml diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..45ca7ca --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,52 @@ +local Pipeline(py_version) = { + kind: "pipeline", + name: "tests (Python " + py_version + ")", + steps: [ + { + name: "test", + image: "python:" + py_version, + [if py_version == "2.7" then "failure" else null]: "ignore", + commands: [ + "pip install .", + "pip install -r requirements-dev.txt", + "nosetests" + ] + } + ] +}; + +[ + Pipeline("2.7"), + Pipeline("3.4"), + Pipeline("3.5"), + Pipeline("3.6"), + Pipeline("3.7"), + { + kind: "pipeline", + name: "upload release", + trigger: { + event: ['tag'], + status: ['success'], + }, + depends_on: [ + # We are ignoring 2.7 since it's randomly fails because of certificate_transparency module + "tests (Python 3.4)", + "tests (Python 3.5)", + "tests (Python 3.6)", + "tests (Python 3.7)", + ], + steps: [ + { + name: "publish", + image: "plugins/pypi", + settings: { + distributions: ["sdist", "bdist_wheel"], + username: "Pr0Ger", + password: { + from_secret: "pypi_password" + }, + }, + }, + ], + }, +] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 487e09f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: python - -cache: pip - -python: -- '2.7' -- '3.4' -- '3.5' -- '3.6' -- '3.7' - -install: -- pip install . -- pip install -r requirements-dev.txt - -script: -- nosetests - -jobs: - include: - - stage: PyPI release - python: '3.6' - script: skip - deploy: - provider: pypi - user: Pr0Ger - password: - secure: BH1dlIcbjoIF3AJrJwPW/UXfs+8eWfNUzkVBID+5csOvEd8/YEPmyxbabUSEVGhc5irMsPEGZVZIdYShQep6Hi/01kXgvrZDBEqHnRMJ79FMv7xiKyt98KMVutmVDnzd+PgAcGBomLYb0BlQEtkD1DlwtoxqOh+7Rz7+yqsRy05PbqECgvF1FalFh4lzNHFUoa1smdHwA6olav4dWHdjCnE4GEXAfQUBBvDSpQm+Hj4OUpB5MetYiKHoBVGUibwq2QZ51V1AtSFs/53FcvCmOzxVTBgXgJd0r+B3z2Au/S8x/ERvSOpXKDK0FBr3JalpjhDxIfetMnULc1fjwaTdJ99auMoPn15MnCzQ4WPMHL0DLrVLPzkr0hMe2ENp8B4ULHmhzJdppqh7S3ptBpkH2zGQWS5NIleJhvOeL2+jrI9stTnaadEQqKqUMdGLxqPgQGrggJxEPWQ22DpSYIHmczxWsRqv7gKm/cOq3w5lzbvqZ+8OWxpORv310k4BRxws+jec8YzSBLo5VN4CldMIIck3TKYwjiPbZQMz2qfuSok1tH8VyJRKqM51lfF/5U7qA7pnz9aVufvrA6u61wn+9MKhtr5kzmHnZEQOYvKSVNQqr9xBhBHianT/wRTh1LrilXnzX9CWKlRcGTXGxrxpc+g2LejxRvxPG7hXOyt0vbM= - distributions: sdist bdist_wheel - on: - tags: true - -notifications: - email: false - slack: - secure: hqbqt/zePs9ognCQT/IlLmRBpTxudSBR88GK/Qu0GOJZhuBsFvUbHaDKkTsIPYoLsZPKYss0tpKsRQJG0GlO8da7d/raR4gSNI5y0ypso5ttN+OgLf4pa1bUwz0Q39aDFcuSG9aZEU134hk19KYFxz3h+gLI5C51mnnm2qOK1goq+ZNTtIz42y7kxRnF4opExLS9+ZTUxV2eA5lEvgoju6PVXfu1CkzPZKZt3XXnl3G2LGo4pitemiOIBSiVHLuakLmZ5z7IyVTbsB2Sh+2HoTdvGpdxNJcy0wDbvnZ0ZE3otrCkggaTQJ8uMEygsx8JafmDCC3sAosCqftj+SG9bG9LSmypizmipNEClSq5iKEtniGhoR1Imzbk7b5yth6q3TETY/fYFt9hATDBbn+IS0ZD0kJaVfN5Tgi6fiFtKbHPl9XxdLDffPDv5/AvSlY0CaDpTeN8j3YkMHSyuSN+u+qyai5KTWi4b2WZDY5MklTO6/3Kems/rYatCYjthzW94Di2rNDxnESeUmWy94npRxYg+HBVlVO5kG/ujHwwT5jU6icOcIJrtQAnJfTApyrEvqYtHUw0WATq/aTSYDEwQvJtV9xPX1R3XuDSZ+MBXobo+nplStkMdo0FmHcYrwi0oAohnmMu0jFMuByoY8crawrKB3EC/0/BHJvRs6QTWSE= diff --git a/README.md b/README.md index 21326bc..be8ddb4 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ [![PyPI version](https://img.shields.io/pypi/v/apns2.svg)](https://pypi.python.org/pypi/apns2) [![PyPI version](https://img.shields.io/pypi/pyversions/apns2.svg)](https://pypi.python.org/pypi/apns2) -[![Build Status](https://img.shields.io/travis/Pr0Ger/PyAPNs2.svg)](https://travis-ci.org/Pr0Ger/PyAPNs2) -[![Code Climate](https://img.shields.io/codeclimate/github/Pr0Ger/PyAPNs2.svg)](https://codeclimate.com/github/Pr0Ger/PyAPNs2) +[![Build Status](https://drone.pr0ger.dev/api/badges/Pr0Ger/PyAPNs2/status.svg)](https://drone.pr0ger.dev/Pr0Ger/PyAPNs2) Python library for interacting with the Apple Push Notification service (APNs) via HTTP/2 protocol diff --git a/requirements-dev.txt b/requirements-dev.txt index 9e428e6..cca3309 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,3 @@ freezegun +nose mock; python_version < '3.3'