Skip to content

Commit 3dd9e54

Browse files
authored
Merge branch 'master' into develop
2 parents 09a06d4 + ba4d997 commit 3dd9e54

81 files changed

Lines changed: 2887 additions & 660 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.git/
12
*.pyc
23
*__pycache__

.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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ MANIFEST
4242

4343
.venv
4444

45+
*.sw[pon]
46+
.eggs

.travis.yml

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

DESCRIPTION.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ digitalocean.com APIs, such as:
4343
- Enable/Disable automatic Backups
4444
- Restore root password of a Droplet
4545

46-
 Examples
46+
Examples
4747
---------
4848

4949
Listing the droplets

Dockerfile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
# Dokcerfile made to test this
2-
FROM ubuntu:14.04
1+
# Dockerfile made to test this
2+
FROM python:alpine
33

4-
MAINTAINER Lorenzo Setale <koalalorenzo@gmail.com>
5-
6-
RUN apt-get update
7-
RUN apt-get install --yes git python3-dev python3-pip python-dev python-pip
8-
RUN pip3 install -U pip
9-
RUN pip2 install -U pip
4+
MAINTAINER Lorenzo Setale <lorenzo@setale.me>
105

116
RUN pip3 install -U python-digitalocean pytest
12-
RUN pip2 install -U python-digitalocean pytest
13-
14-
WORKDIR /root/
15-
ADD . /root/python-digitalocean
167

178
WORKDIR /root/python-digitalocean
18-
RUN pip2 install -U -r requirements.txt
9+
ADD requirements.txt requirements.txt
1910
RUN pip3 install -U -r requirements.txt
2011

21-
CMD python2 -m pytest ; python3 -m pytest
12+
ADD . /root/python-digitalocean
13+
14+
CMD python3 -m pytest

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+

0 commit comments

Comments
 (0)