Skip to content

Commit c4dcee5

Browse files
authored
Merge pull request #325 from koalalorenzo/adds-makefiles-and-bumps-version
Automate test and publish + Makefile + Bump to 1.16.0
2 parents 027b56c + 7da828a commit c4dcee5

8 files changed

Lines changed: 79 additions & 16 deletions

File tree

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Upload Python Package on Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: make publish_deps deps
18+
- name: Test code
19+
run: make test
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: make clean dist publish

.github/workflows/tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Python Tests
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
python-version: ['2.x', '3.x', 3.6, 3.7, 3.8]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: make deps
22+
- name: Run tests
23+
run: make test

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
clean:
2+
rm -rf build
3+
rm -rf dist
4+
rm -rf python_digitalocean.egg-info
5+
rm -rf .pytest_cache
6+
.PHONY: clean
7+
8+
dist:
9+
python setup.py sdist bdist_wheel
10+
11+
publish: dist
12+
twine upload dist/*
13+
.PHONY: publish
14+
15+
publish_deps:
16+
python -m pip install --upgrade pip
17+
pip install setuptools wheel twine
18+
.PHONY: publish_deps
19+
20+
deps:
21+
pip install -U -r requirements.txt
22+
.PHONY: deps
23+
24+
test:
25+
python -m pytest
26+
.PHONY: test
27+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ key.create()
226226
manager = digitalocean.Manager(token="secretspecialuniquesnowflake")
227227
keys = manager.get_all_sshkeys()
228228

229-
droplet = digitalocean.Droplet(token="secretspecialuniquesnowflake",
229+
droplet = digitalocean.Droplet(token=manager.token,
230230
name='DropletWithSSHKeys',
231231
region='ams3', # Amster
232232
image='ubuntu-20-04-x64', # Ubuntu 20.04 x64

digitalocean/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
"""digitalocean API to manage droplets"""
33

4-
__version__ = "1.15.0"
4+
__version__ = "1.16.0"
55
__author__ = "Lorenzo Setale ( http://who.is.lorenzo.setale.me/? )"
66
__author_email__ = "lorenzo@setale.me"
77
__license__ = "LGPL v3"

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
# built documents.
6161
#
6262
# The short X.Y version.
63-
version = u'1.15.0'
63+
version = u'1.16.0'
6464
# The full version, including alpha/beta/rc tags.
65-
release = u'1.15.0'
65+
release = u'1.16.0'
6666

6767
# The language for content autogenerated by Sphinx. Refer to documentation
6868
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name='python-digitalocean',
18-
version='1.15.0',
18+
version='1.16.0',
1919
description='digitalocean.com API to manage Droplets and Images',
2020
author='Lorenzo Setale ( http://who.is.lorenzo.setale.me/? )',
2121
author_email='lorenzo@setale.me',

0 commit comments

Comments
 (0)